PHP Класс Autarky\Files\LockingFilesystem
The object will add a file lock before writing and release it right after the
contents have been written. This can be used to prevent corruption of data
when multiple requests try to write to the same file at the same time.
Показать файл
Открыть проект
Примеры использования класса
Открытые методы
Описание методов
public read ( string $path, boolean $blocking = false ) : string |
$path |
string |
Path to the file. |
$blocking |
boolean |
Wait for other locks to expire rather than
throwing an error when a lock cannot be aquired. |
Результат |
string |
|
public write ( string $path, string $contents, boolean $blocking = false ) : void |
$path |
string |
Path to the file. |
$contents |
string |
Contents to write to the file. |
$blocking |
boolean |
Wait for other locks to expire rather than
throwing an error when a lock cannot be aquired. |
Результат |
void |
|