Skip to content

Kirby 5.5.0

F::update()

Serializes concurrent read-update-writes of a file by holding an exclusive flock for the whole operation, so that other writers (that lock the same way) cannot lose each other's updates. The $modifier callback receives the current file contents.

F::update(string $file, callable $modifier): bool

Parameters

Name Type Default
$filerequired string no default value
$modifierrequired callable no default value

Return type

bool

Parent class

Kirby\Filesystem\F