A wrapper around Flysystem that implements Elgg's filesystem API. More...
Public Member Functions | |
__construct (Filesystem $filesystem, $local_path= '', $chroot= '') | |
Use one of the static factory functions to create an instance. More... | |
chroot ($path) | |
isFile ($path) | |
getContents ($path) | |
getFile ($path) | |
getFiles ($path= '', $recursive=true) | |
getDirectories ($path= '', $recursive=true) | |
getPath ($path= '') | |
includeFile ($path) | |
putContents ($path, $content) | |
Static Public Member Functions | |
static | createLocal ($path) |
Shorthand for generating a new local filesystem. More... | |
static | createInMemory () |
Shorthand for generating a new in-memory-only filesystem. More... | |
Protected Member Functions | |
getEntries ($path= '', $recursive=true, $types=['file', 'dir']) | |
List the files and directories in the given directory path. More... | |
Elgg\Filesystem\Directory\Fly::__construct | ( | Filesystem | $filesystem, |
$local_path = '' , |
|||
$chroot = '' |
|||
) |
Use one of the static factory functions to create an instance.
Filesystem | $filesystem | The underlying filesystem implementation. It must have the 'ListFiles' plugin. |
string | $local_path | Only applicable for local filesystem. |
string | $chroot | Path relative to the underlying filesystem root. |
Elgg\Filesystem\Directory\Fly::chroot | ( | $path | ) |
Implements Elgg\Filesystem\Directory.
|
static |
|
static |
Elgg\Filesystem\Directory\Fly::getContents | ( | $path | ) |
Implements Elgg\Filesystem\Directory.
Elgg\Filesystem\Directory\Fly::getDirectories | ( | $path = '' , |
|
$recursive = true |
|||
) |
Implements Elgg\Filesystem\Directory.
|
protected |
List the files and directories in the given directory path.
string | $path | The subdirectory path within this directory |
bool | $recursive | Find files and directories recursively |
string[] | $types Entry types to return ('file' and/or 'dir') |
Elgg\Filesystem\Directory\Fly::getFile | ( | $path | ) |
Implements Elgg\Filesystem\Directory.
Elgg\Filesystem\Directory\Fly::getFiles | ( | $path = '' , |
|
$recursive = true |
|||
) |
Implements Elgg\Filesystem\Directory.
Elgg\Filesystem\Directory\Fly::getPath | ( | $path = '' | ) |
Implements Elgg\Filesystem\Directory.
Elgg\Filesystem\Directory\Fly::includeFile | ( | $path | ) |
Implements Elgg\Filesystem\Directory.
Elgg\Filesystem\Directory\Fly::isFile | ( | $path | ) |
Implements Elgg\Filesystem\Directory.
Elgg\Filesystem\Directory\Fly::putContents | ( | $path, | |
$content | |||
) |
Implements Elgg\Filesystem\Directory.