Constants

VISIBILITY_PUBLIC

VISIBILITY_PUBLIC = 'public'

VISIBILITY_PRIVATE

VISIBILITY_PRIVATE = 'private'

Methods

has()

has(string  $path) : array|boolean|null

Check whether a file exists.

Parameters

string $path

Returns

array|boolean|null

read()

read(string  $path) : array|false

Read a file.

Parameters

string $path

Returns

array|false

readStream()

readStream(string  $path) : array|false

Read a file as a stream.

Parameters

string $path

Returns

array|false

listContents()

listContents(string  $directory = '', boolean  $recursive = false) : array

List contents of a directory.

Parameters

string $directory
boolean $recursive

Returns

array

getMetadata()

getMetadata(string  $path) : array|false

Get all the meta data of a file or directory.

Parameters

string $path

Returns

array|false

getSize()

getSize(string  $path) : array|false

Get the size of a file.

Parameters

string $path

Returns

array|false

getMimetype()

getMimetype(string  $path) : array|false

Get the mimetype of a file.

Parameters

string $path

Returns

array|false

getTimestamp()

getTimestamp(string  $path) : array|false

Get the last modified time of a file as a timestamp.

Parameters

string $path

Returns

array|false

getVisibility()

getVisibility(string  $path) : array|false

Get the visibility of a file.

Parameters

string $path

Returns

array|false

write()

write(string  $path, string  $contents, \League\Flysystem\Config  $config) : array|false

Write a new file.

Parameters

string $path
string $contents
\League\Flysystem\Config $config

Config object

Returns

array|false —

false on failure file meta data on success

writeStream()

writeStream(string  $path, resource  $resource, \League\Flysystem\Config  $config) : array|false

Write a new file using a stream.

Parameters

string $path
resource $resource
\League\Flysystem\Config $config

Config object

Returns

array|false —

false on failure file meta data on success

update()

update(string  $path, string  $contents, \League\Flysystem\Config  $config) : array|false

Update a file.

Parameters

string $path
string $contents
\League\Flysystem\Config $config

Config object

Returns

array|false —

false on failure file meta data on success

updateStream()

updateStream(string  $path, resource  $resource, \League\Flysystem\Config  $config) : array|false

Update a file using a stream.

Parameters

string $path
resource $resource
\League\Flysystem\Config $config

Config object

Returns

array|false —

false on failure file meta data on success

rename()

rename(string  $path, string  $newpath) : boolean

Rename a file.

Parameters

string $path
string $newpath

Returns

boolean

copy()

copy(string  $path, string  $newpath) : boolean

Copy a file.

Parameters

string $path
string $newpath

Returns

boolean

delete()

delete(string  $path) : boolean

Delete a file.

Parameters

string $path

Returns

boolean

deleteDir()

deleteDir(string  $dirname) : boolean

Delete a directory.

Parameters

string $dirname

Returns

boolean

createDir()

createDir(string  $dirname, \League\Flysystem\Config  $config) : array|false

Create a directory.

Parameters

string $dirname

directory name

\League\Flysystem\Config $config

Returns

array|false

setVisibility()

setVisibility(string  $path, string  $visibility) : array|false

Set the visibility for a file.

Parameters

string $path
string $visibility

Returns

array|false —

file meta data