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.
1 parent 1a5f2fe commit 78e6f65Copy full SHA for 78e6f65
components/filesystem.rst
@@ -311,10 +311,16 @@ The ``file.txt`` file contains ``Hello World`` now.
311
contents at the end of some file::
312
313
$filesystem->appendToFile('logs.txt', 'Email sent to user@example.com');
314
+ // with the third argument set to true you can lock the file when writing to it.
315
+ $filesystem->appendToFile('logs.txt', 'Email sent to user@example.com', true);
316
317
If either the file or its containing directory doesn't exist, this method
318
creates them before appending the contents.
319
320
+.. versionadded:: 5.4
321
+
322
+ The third argument ``$lock`` was introduced in Symfony 5.4.
323
324
Error Handling
325
--------------
326
0 commit comments