Elgg
Version 1.11
|
A simple directory abstraction. More...
Public Member Functions | |
chroot ($path) | |
Returns a subdirectory with access limited to the given directory. More... | |
getContents ($path) | |
Read the file off the filesystem. More... | |
getFile ($path) | |
A reference to the file at the given path, even if it doesn't exist yet. More... | |
getFiles ($path= '') | |
Recursively list the files in the given directory path. More... | |
includeFile ($path) | |
Do a PHP include of the file and return the result. More... | |
isFile ($path) | |
Whether this directory has an existing file at the given location. More... | |
putContents ($path, $content) | |
Write a file, overwriting the contents if necessary. More... | |
Elgg\Filesystem\Directory::chroot | ( | $path | ) |
Returns a subdirectory with access limited to the given directory.
string | $path | The path relative to this directory to chroot to. |
Implemented in Elgg\Filesystem\GaufretteDirectory.
Elgg\Filesystem\Directory::getContents | ( | $path | ) |
Read the file off the filesystem.
string | $path | The directory-relative path to the target file. |
Implemented in Elgg\Filesystem\GaufretteDirectory.
Elgg\Filesystem\Directory::getFile | ( | $path | ) |
A reference to the file at the given path, even if it doesn't exist yet.
However, will throw an exception if the file is already a directory.
string | $path | The path to the file, relative to this directory. |
Implemented in Elgg\Filesystem\GaufretteDirectory.
Elgg\Filesystem\Directory::getFiles | ( | $path = '' | ) |
Recursively list the files in the given directory path.
string | $path | The subdirectory path within this directory |
Implemented in Elgg\Filesystem\GaufretteDirectory.
Elgg\Filesystem\Directory::includeFile | ( | $path | ) |
Do a PHP include of the file and return the result.
NB: This only really works with local filesystems amirite?
string | $path | Filesystem-relative path for the file to include. |
Implemented in Elgg\Filesystem\GaufretteDirectory.
Elgg\Filesystem\Directory::isFile | ( | $path | ) |
Whether this directory has an existing file at the given location.
string | $path | The relative path within this directory |
Implemented in Elgg\Filesystem\GaufretteDirectory.
Elgg\Filesystem\Directory::putContents | ( | $path, | |
$content | |||
) |
Write a file, overwriting the contents if necessary.
string | $path | The path to the file. |
string | $content | The literal text content of the file. |
Implemented in Elgg\Filesystem\GaufretteDirectory.