/**
 * Prepend to a file.
 *
 * @param  string $data The data to write.
 *
 * @return int|bool Returns the number of bytes that were written to the file, or FALSE on failure.
 */
public function prepend(string $data)

Examples

$filesystem->file('/foo/1.txt')->prepend('hello ');

Getting Started

Methods

Filesystem
File
Directory