has()
has(string $path) : boolean
Check whether a file exists.
Parameters
string | $path |
write(string $path, string $contents, array $config = array()) : boolean
Write a new file.
string | $path | The path of the new file. |
string | $contents | The file contents. |
array | $config | An optional configuration array. |
True on success, false on failure.
writeStream(string $path, resource $resource, array $config = array()) : boolean
Write a new file using a stream.
string | $path | The path of the new file. |
resource | $resource | The file handle. |
array | $config | An optional configuration array. |
If $resource is not a file handle.
True on success, false on failure.
update(string $path, string $contents, array $config = array()) : boolean
Update an existing file.
string | $path | The path of the existing file. |
string | $contents | The file contents. |
array | $config | An optional configuration array. |
True on success, false on failure.
updateStream(string $path, resource $resource, array $config = array()) : boolean
Update an existing file using a stream.
string | $path | The path of the existing file. |
resource | $resource | The file handle. |
array | $config | An optional configuration array. |
If $resource is not a file handle.
True on success, false on failure.
rename(string $path, string $newpath) : boolean
Rename a file.
string | $path | Path to the existing file. |
string | $newpath | The new path of the file. |
Thrown if $newpath exists.
Thrown if $path does not exist.
True on success, false on failure.
copy(string $path, string $newpath) : boolean
Copy a file.
string | $path | Path to the existing file. |
string | $newpath | The new path of the file. |
Thrown if $newpath exists.
Thrown if $path does not exist.
True on success, false on failure.
putStream(string $path, resource $resource, array $config = array()) : boolean
Create a file or update if exists.
string | $path | The path to the file. |
resource | $resource | The file handle. |
array | $config | An optional configuration array. |
Thrown if $resource is not a resource.
True on success, false on failure.
get(string $path, \League\Flysystem\Handler $handler = null) : \League\Flysystem\Handler
Get a file/directory handler.
string | $path | The path to the file. |
\League\Flysystem\Handler | $handler | An optional existing handler to populate. |
Either a file or directory handler.
addPlugin(\League\Flysystem\PluginInterface $plugin) : $this
Register a plugin.
\League\Flysystem\PluginInterface | $plugin | The plugin to register. |
None found |