class LockableFile (View source)
| protected resource | $handle | The file resource. | |
| protected string | $path | The file path. | |
| protected bool | $isLocked | Indicates if the file is locked. | 
| void | __construct(string $path, string $mode) Create a new File instance. | |
| void | ensureDirectoryExists(string $path) Create the file's directory if necessary. | |
| void | createResource(string $path, string $mode) Create the file resource. | |
| string | read(int|null $length = null) Read the file contents. | |
| int | size() Get the file size. | |
| string | write(string $contents) Write to the file. | |
| $this | truncate() Truncate the file. | |
| $this | getSharedLock(bool $block = false) Get a shared lock on the file. | |
| bool | getExclusiveLock(bool $block = false) Get an exclusive lock on the file. | |
| $this | releaseLock() Release the lock on the file. | |
| bool | close() Close the file. | 
Create a new File instance.
Create the file's directory if necessary.
Create the file resource.
Read the file contents.
Get the file size.
Write to the file.
Truncate the file.
Get a shared lock on the file.
Get an exclusive lock on the file.
Release the lock on the file.
Close the file.
    © Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
    https://laravel.com/api/8.x/Illuminate/Filesystem/LockableFile.html