Skip to content

Commit 0c76724

Browse files
committed
minor #17120 [Filesystem] Add more information about dumpFile (mohamedGasmii)
This PR was squashed before being merged into the 6.0 branch. Discussion ---------- [Filesystem] Add more information about dumpFile Add more information about dumpFile : 1- creating file if it does not exists. 2- mention that the old data inside the file will be lost if it exists. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `6.x` for features of unreleased versions). --> Commits ------- 37106b4 [Filesystem] Add more information about dumpFile
2 parents 00ecbd4 + 37106b4 commit 0c76724

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/filesystem.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,12 @@ complete new file (but never a partially-written file)::
302302

303303
The ``file.txt`` file contains ``Hello World`` now.
304304

305+
If either the file or its containing directory doesn't exist, this method
306+
creates them.
307+
308+
After writing the temporary file, this method use :method:`Symfony\\Component\\Filesystem\\Filesystem::rename`
309+
and set the third argument to true, so if the file exists, it will be overridden and the old content inside will be lost.
310+
305311
``appendToFile``
306312
~~~~~~~~~~~~~~~~
307313

0 commit comments

Comments
 (0)