JamesMoss\Flywheel\Repository::write PHP Метод

write() защищенный Метод

Writes data to the filesystem.
protected write ( string $path, string $contents ) : boolean
$path string The absolute file path to write to
$contents string The contents of the file to write
Результат boolean Returns true if write was successful, false if not.
    protected function write($path, $contents)
    {
        $fp = fopen($path, 'w');
        if (!flock($fp, LOCK_EX)) {
            return false;
        }
        $result = fwrite($fp, $contents);
        flock($fp, LOCK_UN);
        fclose($fp);
        return $result !== false;
    }