8000 Update filesystem.rst · symfony/symfony-docs@de2f608 · GitHub
[go: up one dir, main page]

Skip to content

Commit de2f608

Browse files
authored
Update filesystem.rst
1 parent 057f279 commit de2f608

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

components/filesystem.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,14 @@ isAbsolutePath
283283
// returns false
284284
$fileSystem->isAbsolutePath('../dir');
285285

286+
tempnam
287+
~~~~~~~
288+
289+
:method:`Symfony\\Component\\Filesystem\\Filesystem::tempnam` creates a temporary file with a unique filename, and returns its path, or throw an exception on failure::
290+
291+
// returns a path like : /tmp/prefix_wyjgtF
292+
$filesystem->tempnam('/tmp', 'prefix_');
293+
286294
dumpFile
287295
~~~~~~~~
288296

0 commit comments

Comments
 (0)
0