Constants

VISIBILITY_PUBLIC

VISIBILITY_PUBLIC = 'public'

VISIBILITY_PRIVATE

VISIBILITY_PRIVATE = 'private'

Methods

has()

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

Check whether a file exists.

Parameters

string $path

Returns

array|bool|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 = '', bool  $recursive = false) : array

List contents of a directory.

Parameters

string $directory
bool $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) : bool

Rename a file.

Parameters

string $path
string $newpath

Returns

bool —

copy()

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

Copy a file.

Parameters

string $path
string $newpath

Returns

bool —

delete()

delete(string  $path) : bool

Delete a file.

Parameters

string $path

Returns

bool —

deleteDir()

deleteDir(string  $dirname) : bool

Delete a directory.

Parameters

string $dirname

Returns

bool —

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