Elgg  Version master
Directory.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Filesystem;
4 
6 
7 
14 interface Directory {
15 
25  public function chroot($path);
26 
36  public function getContents($path);
37 
49  public function getFile($path);
50 
61  public function getFiles($path = '', $recursive = true);
62 
73  public function getDirectories($path = '', $recursive = true);
74 
84  public function getPath($path = '');
85 
86 
98  public function includeFile($path);
99 
109  public function isFile($path);
110 
121  public function putContents($path, $content);
122 }
A simple directory abstraction.
Definition: Directory.php:14
getFile($path)
A reference to the file at the given path, even if it doesn&#39;t exist yet.
isFile($path)
Whether this directory has an existing file at the given location.
$path
Definition: details.php:68
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
getDirectories($path= '', $recursive=true)
List the directories in the given directory path.