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 fefc2f2 commit 675ee7fCopy full SHA for 675ee7f
components/filesystem.rst
@@ -283,6 +283,20 @@ complete new file (but never a partially-written file)::
283
284
The ``file.txt`` file contains ``Hello World`` now.
285
286
+appendToFile
287
+~~~~~~~~~~~~
288
+
289
+.. versionadded:: 3.3
290
+ The :method:`Symfony\\Component\\Filesystem\\Filesystem::appendToFile` method was introduced in Symfony 3.3.
291
292
+:method:`Symfony\\Component\\Filesystem\\Filesystem::appendToFile` adds new
293
+contents at the end of some file::
294
295
+ $fs->appendToFile('logs.txt', 'Email sent to user@example.com');
296
297
+If either the file or its containing directory doesn't exist, this method
298
+creates them before appending the contents.
299
300
Error Handling
301
--------------
302
0 commit comments