We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 77c1ad3 + 7dd2995 commit 2aeaf10Copy full SHA for 2aeaf10
components/filesystem.rst
@@ -307,10 +307,16 @@ The ``file.txt`` file contains ``Hello World`` now.
307
contents at the end of some file::
308
309
$filesystem->appendToFile('logs.txt', 'Email sent to user@example.com');
310
+ // the third argument tells whether the file should be locked when writing to it
311
+ $filesystem->appendToFile('logs.txt', 'Email sent to user@example.com', true);
312
313
If either the file or its containing directory doesn't exist, this method
314
creates them before appending the contents.
315
316
+.. versionadded:: 5.4
317
+
318
+ The third argument of ``appendToFile()`` was introduced in Symfony 5.4.
319
320
Error Handling
321
--------------
322
0 commit comments