Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[WCM] [Filesystem] Added documentation for tempnam #5320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions components/filesystem/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,21 @@ isAbsolutePath
// return false
$fs->isAbsolutePath('../dir');

tempnam
~~~~~~~

.. versionadded:: 2.7
The ``tempnam()`` function was introduced in Symfony 2.7.

:method:`Symfony\\Component\\Filesystem\\Filesystem::tempnam` is a drop-in
replacement for PHP's builtin :phpfunction:`tempnam` function which allows
you to create a temporary file on a stream if the stream is writable. It
returns false on failure.

$tmpFile = $fs->tempnam('ftp://example.com/tmp', 'FOO');

``$tmpFile`` will be the name of the temporary file or false.

dumpFile
~~~~~~~~

Expand Down