Skip to content

Commit 78e6f65

Browse files
zairigimadjaviereguiluz
authored andcommitted
Update filesystem.rst
1 parent 1a5f2fe commit 78e6f65

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/filesystem.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,16 @@ The ``file.txt`` file contains ``Hello World`` now.
311311
contents at the end of some file::
312312

313313
$filesystem->appendToFile('logs.txt', 'Email sent to [email protected]');
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 [email protected]', true);
314316

315317
If either the file or its containing directory doesn't exist, this method
316318
creates them before appending the contents.
317319

320+
.. versionadded:: 5.4
321+
322+
The third argument ``$lock`` was introduced in Symfony 5.4.
323+
318324
Error Handling
319325
--------------
320326

0 commit comments

Comments
 (0)