Properties

$path

$path : string

Type

string

Methods

__construct()

__construct(\League\Flysystem\FilesystemInterface  $filesystem = null, string  $path = null) 

Constructor.

Parameters

\League\Flysystem\FilesystemInterface $filesystem
string $path

isDir()

isDir() : boolean

Check whether the entree is a directory.

Returns

boolean

isFile()

isFile() : boolean

Check whether the entree is a file.

Returns

boolean

getType()

getType() : string

Retrieve the entree type (file|dir).

Returns

string —

file or dir

setFilesystem()

setFilesystem(\League\Flysystem\FilesystemInterface  $filesystem) : $this

Set the Filesystem object.

Parameters

\League\Flysystem\FilesystemInterface $filesystem

Returns

$this

setPath()

setPath(string  $path) : $this

Set the entree path.

Parameters

string $path

Returns

$this

getPath()

getPath() : string

Retrieve the entree path.

Returns

string —

path

__call()

__call(string  $method, array  $arguments) : mixed

Plugins pass-through.

Parameters

string $method
array $arguments

Returns

mixed

exists()

exists() : boolean

Check whether the file exists.

Returns

boolean

read()

read() : string|false

Read the file.

Returns

string|false —

file contents

readStream()

readStream() : resource|false

Read the file as a stream.

Returns

resource|false —

file stream

write()

write(string  $content) : boolean

Write the new file.

Parameters

string $content

Returns

boolean —

success boolean

writeStream()

writeStream(resource  $resource) : boolean

Write the new file using a stream.

Parameters

resource $resource

Returns

boolean —

success boolean

update()

update(string  $content) : boolean

Update the file contents.

Parameters

string $content

Returns

boolean —

success boolean

updateStream()

updateStream(resource  $resource) : boolean

Update the file contents with a stream.

Parameters

resource $resource

Returns

boolean —

success boolean

put()

put(string  $content) : boolean

Create the file or update if exists.

Parameters

string $content

Returns

boolean —

success boolean

putStream()

putStream(resource  $resource) : boolean

Create the file or update if exists using a stream.

Parameters

resource $resource

Returns

boolean —

success boolean

rename()

rename(string  $newpath) : boolean

Rename the file.

Parameters

string $newpath

Returns

boolean —

success boolean

copy()

copy(string  $newpath) : \League\Flysystem\File|false

Copy the file.

Parameters

string $newpath

Returns

\League\Flysystem\File|false —

new file or false

getTimestamp()

getTimestamp() : string|false

Get the file's timestamp.

Returns

string|false —

The timestamp or false on failure.

getMimetype()

getMimetype() : string|false

Get the file's mimetype.

Returns

string|false —

The file mime-type or false on failure.

getVisibility()

getVisibility() : string|false

Get the file's visibility.

Returns

string|false —

The visibility (public|private) or false on failure.

getMetadata()

getMetadata() : array|false

Get the file's metadata.

Returns

array|false —

The file metadata or false on failure.

getSize()

getSize() : integer|false

Get the file size.

Returns

integer|false —

The file size or false on failure.

delete()

delete() : boolean

Delete the file.

Returns

boolean —

success boolean