Properties

$path

$path : string

Type

string

Methods

__construct()

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

Constructor.

Parameters

\League\Flysystem\FilesystemInterface $filesystem
string $path

Returns

mixed —

isDir()

isDir() : bool

Check whether the entree is a directory.

Returns

bool —

isFile()

isFile() : bool

Check whether the entree is a file.

Returns

bool —

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 —

getFilesystem()

getFilesystem() : \League\Flysystem\FilesystemInterface

Retrieve the Filesystem object.

Returns

\League\Flysystem\FilesystemInterface —

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() : bool

Check whether the file exists.

Returns

bool —

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) : bool

Write the new file.

Parameters

string $content

Returns

bool —

success boolean

writeStream()

writeStream(resource  $resource) : bool

Write the new file using a stream.

Parameters

resource $resource

Returns

bool —

success boolean

update()

update(string  $content) : bool

Update the file contents.

Parameters

string $content

Returns

bool —

success boolean

updateStream()

updateStream(resource  $resource) : bool

Update the file contents with a stream.

Parameters

resource $resource

Returns

bool —

success boolean

put()

put(string  $content) : bool

Create the file or update if exists.

Parameters

string $content

Returns

bool —

success boolean

putStream()

putStream(resource  $resource) : bool

Create the file or update if exists using a stream.

Parameters

resource $resource

Returns

bool —

success boolean

rename()

rename(string  $newpath) : bool

Rename the file.

Parameters

string $newpath

Returns

bool —

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() : int|false

Get the file size.

Returns

int|false —

The file size or false on failure.

delete()

delete() : bool

Delete the file.

Returns

bool —

success boolean