Skip to content

Commit 80c3fb3

Browse files
committed
[#2592] Minor tweaks for Filesystem::dumpFile
1 parent 05f1aaf commit 80c3fb3

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

components/filesystem.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,17 +230,16 @@ dumpFile
230230
~~~~~~~~
231231

232232
:method:`Symfony\\Component\\Filesystem\\Filesystem::dumpFile` allows you to
233-
dump contents in a file. It does it in a atomic manner, that means it writes a
234-
temporary file first and then moves that to the new place when it's finished.
235-
This means the user does see either the old or the new state
236-
237-
.. code-block:: php
233+
dump contents to a file. It does this in an atomic manner: it writes a temporary
234+
file first and then moves it to the new file location when it's finished.
235+
This means that the user will always see either the complete old file or
236+
complete new file (but never a partially-written file)::
238237

239238
$fs->dumpFile('file.txt', 'Hello World');
240239

241240
The ``file.txt`` file contains ``Hello World`` now.
242241

243-
A desired file mode can be passed as third argument.
242+
A desired file mode can be passed as the third argument.
244243

245244
Error Handling
246245
--------------

0 commit comments

Comments
 (0)