File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -230,17 +230,16 @@ dumpFile
230
230
~~~~~~~~
231
231
232
232
: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)::
238
237
239
238
$fs->dumpFile('file.txt', 'Hello World');
240
239
241
240
The ``file.txt `` file contains ``Hello World `` now.
242
241
243
- A desired file mode can be passed as third argument.
242
+ A desired file mode can be passed as the third argument.
244
243
245
244
Error Handling
246
245
--------------
You can’t perform that action at this time.
0 commit comments