Skip to content

Kirby 4.1.2

F::write()

Creates a new file

F::write(string $file, mixed $content, bool $append = false): bool

Parameters

Name Type Default Description
$file * string The path for the new file
$content * mixed Either a string, an object or an array. Arrays and objects will be serialized.
$append bool false true: append the content to an existing file if available. false: overwrite.

Return type

bool

Parent class

Kirby\Filesystem\F