File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -268,11 +268,12 @@ public function prepend($path, $data)
268
268
*
269
269
* @param string $path
270
270
* @param string $data
271
+ * @param bool $lock
271
272
* @return int
272
273
*/
273
- public function append ($ path , $ data )
274
+ public function append ($ path , $ data, $ lock = false )
274
275
{
275
- return file_put_contents ($ path , $ data , FILE_APPEND );
276
+ return file_put_contents ($ path , $ data , FILE_APPEND | ( $ lock ? LOCK_EX : 0 ) );
276
277
}
277
278
278
279
/**
Original file line number Diff line number Diff line change 16
16
* @method static void replace(string $path, string $content, int|null $mode = null)
17
17
* @method static void replaceInFile(array|string $search, array|string $replace, string $path)
18
18
* @method static int prepend(string $path, string $data)
19
- * @method static int append(string $path, string $data)
19
+ * @method static int append(string $path, string $data, bool $lock = false )
20
20
* @method static mixed chmod(string $path, int|null $mode = null)
21
21
* @method static bool delete(string|array $paths)
22
22
* @method static bool move(string $path, string $target)
You can’t perform that action at this time.
0 commit comments