Skip to content

Commit 31a6ff1

Browse files
committed
Reword
1 parent 0c76724 commit 31a6ff1

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

components/filesystem.rst

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -293,21 +293,16 @@ exception on failure::
293293
~~~~~~~~~~~~
294294

295295
:method:`Symfony\\Component\\Filesystem\\Filesystem::dumpFile` saves the given
296-
contents into a file. It does this in an atomic manner: it writes a temporary
297-
file first and then moves it to the new file location when it's finished.
298-
This means that the user will always see either the complete old file or
299-
complete new file (but never a partially-written file)::
296+
contents into a file (creating the file and its directory if they don't exist).
297+
It does this in an atomic manner: it writes a temporary file first and then moves
298+
it to the new file location when it's finished. This means that the user will
299+
always see either the complete old file or complete new file (but never a
300+
partially-written file)::
300301

301302
$filesystem->dumpFile('file.txt', 'Hello World');
302303

303304
The ``file.txt`` file contains ``Hello World`` now.
304305

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-
311306
``appendToFile``
312307
~~~~~~~~~~~~~~~~
313308

0 commit comments

Comments
 (0)