ManaPHP\Filesystem\Adapter\File::filePut PHP Method

filePut() public method

public filePut ( string $file, string $data ) : void
$file string
$data string
return void
    public function filePut($file, $data)
    {
        $file = $this->alias->resolve($file);
        $this->_dirCreate(dirname($file));
        if (file_put_contents($file, $data, LOCK_EX) === false) {
            throw new FileException('write `:file` file failed: :last_error_message', ['file' => $file]);
        }
    }