Class FilesystemAdapter
package |
Default |
---|
__construct(\League\Flysystem\FilesystemInterface $driver)
\League\Flysystem\FilesystemInterface
addPlugin(\League\Flysystem\PluginInterface $plugin) : \League\Flysystem\FilesystemInterface
\League\Flysystem\PluginInterface
The plugin to register.
\League\Flysystem\FilesystemInterface
copy(string $path, string $newpath) : boolean
Throws |
|
---|
string
Path to the existing file.
string
The new path of the file.
boolean
True on success, false on failure.
createDir(string $dirname, array $config = array()) : boolean
string
The name of the new directory.
array
An optional configuration array.
boolean
True on success, false on failure.
delete(string $path) : boolean
Throws |
|
---|
string
boolean
True on success, false on failure.
deleteDir(string $dirname) : boolean
string
boolean
True on success, false on failure.
get(string $path, \Handler $handler = null) : \Handler
deprecated |
---|
string
The path to the file.
\Handler
An optional existing handler to populate.
\Handler
Either a file or directory handler.
getAdapter()
getMetadata(string $path) : array|false
Throws |
|
---|
string
The path to the file.
array|false
The file metadata or false on failure.
getMimetype(string $path) : string|false
Throws |
|
---|
string
The path to the file.
string|false
The file mime-type or false on failure.
getSize(string $path) : integer|false
Throws |
|
---|
string
The path to the file.
integer|false
The file size or false on failure.
getTimestamp(string $path) : string|false
Throws |
|
---|
string
The path to the file.
string|false
The timestamp or false on failure.
getVisibility(string $path) : string|false
Throws |
|
---|
string
The path to the file.
string|false
The visibility (public|private) or false on failure.
has(string $path) : boolean
string
boolean
listContents(string $directory = '', boolean $recursive = false) : array
string
The directory to list.
boolean
Whether to list recursively.
array
A list of file metadata.
put(string $path, string $contents, array $config = array()) : boolean
string
The path to the file.
string
The file contents.
array
An optional configuration array.
boolean
True on success, false on failure.
putStream(string $path, resource $resource, array $config = array()) : boolean
Throws |
|
---|
string
The path to the file.
resource
The file handle.
array
An optional configuration array.
boolean
True on success, false on failure.
read(string $path) : string|false
Throws |
|
---|
string
The path to the file.
string|false
The file contents or false on failure.
readAndDelete(string $path) : string|false
Throws |
|
---|
string
The path to the file.
string|false
The file contents, or false on failure.
readStream(string $path) : resource|false
Throws |
|
---|
string
The path to the file.
resource|false
The path resource or false on failure.
rename(string $path, string $newpath) : boolean
Throws |
|
---|
string
Path to the existing file.
string
The new path of the file.
boolean
True on success, false on failure.
setVisibility(string $path, string $visibility) : boolean
Throws |
|
---|
string
The path to the file.
string
One of 'public' or 'private'.
boolean
True on success, false on failure.
update(string $path, string $contents, array $config = array()) : boolean
Throws |
|
---|
string
The path of the existing file.
string
The file contents.
array
An optional configuration array.
boolean
True on success, false on failure.
updateStream(string $path, resource $resource, array $config = array()) : boolean
Throws |
|
---|
string
The path of the existing file.
resource
The file handle.
array
An optional configuration array.
boolean
True on success, false on failure.
write(string $path, string $contents, array $config = array()) : boolean
Throws |
|
---|
string
The path of the new file.
string
The file contents.
array
An optional configuration array.
boolean
True on success, false on failure.
writeStream(string $path, resource $resource, array $config = array()) : boolean
Throws |
|
---|
string
The path of the new file.
resource
The file handle.
array
An optional configuration array.
boolean
True on success, false on failure.
driver : \League\Flysystem\FilesystemInterface
var |
---|
\League\Flysystem\FilesystemInterface