Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
Directory.php
Go to the documentation of this file.
1 <?php
2 namespace Elgg\Filesystem;
3 
5 
13 interface Directory {
14 
24  public function chroot($path);
25 
35  public function getContents($path);
36 
48  public function getFile($path);
49 
60  public function getFiles($path = '', $recursive = true);
61 
72  public function getDirectories($path = '', $recursive = true);
73 
83  public function getPath($path = '');
84 
85 
97  public function includeFile($path);
98 
108  public function isFile($path);
109 
120  public function putContents($path, $content);
121 }
A simple directory abstraction.
Definition: Directory.php:13
getFile($path)
A reference to the file at the given path, even if it doesn't exist yet.
isFile($path)
Whether this directory has an existing file at the given location.
$path
Definition: details.php:88
getPath($path= '')
Get the absolute path to the given directory-relative path.
includeFile($path)
Do a PHP include of the file and return the result.
putContents($path, $content)
Write a file, overwriting the contents if necessary.
getContents($path)
Read the file off the filesystem.
getFiles($path= '', $recursive=true)
List the files in the given directory path.
chroot($path)
Returns a subdirectory with access limited to the given directory.
$content
Set robots.txt action.
Definition: set_robots.php:6
A read-only interface to a (possibly mutable) group of items.
Definition: Collection.php:33
getDirectories($path= '', $recursive=true)
List the directories in the given directory path.