Метод |
Описание |
|
__construct ( $root ) |
Constructor |
|
__toString ( ) : string |
Makes it possible to echo the entire object |
|
child ( $path ) : mixed |
Returns a subfolder object by path |
|
children ( array $ignore = null, boolean $plain = false ) : mixed |
Return a collection of subfolders |
|
clean ( ) : boolean |
Alternative for flush |
|
content ( array $ignore = null ) : Collection |
Returns a collection with full File and Directory objects
for each item in the directory |
|
copy ( string $to ) : boolean |
Copies the directory to a new location |
|
create ( boolean $recursive = true ) : boolean |
Alternative for make |
|
delete ( boolean $keep = false ) : boolean |
Deletes the directory |
|
exists ( ) : boolean |
Checks if the dir exists |
|
files ( array $ignore = null, boolean $plain = false ) : mixed |
Return a collection of all files within the directory |
|
flush ( ) : boolean |
Deletes all contents of the directory |
|
hash ( ) |
Returns a md5 hash of the root |
|
inventory ( ) : array |
Returns the entire content of the directory |
|
isReadable ( ) : boolean |
Checks if the directory is readable |
|
isWritable ( boolean $recursive = false ) : boolean |
Checks if the directory is writable |
|
make ( boolean $recursive = true ) : boolean |
Creates the directory if it does not exist yet |
|
modified ( $format = null, $handler = 'date' ) : integer |
Recursively check when the dir and all
subfolders have been modified for the last time. |
|
move ( string $to ) : boolean |
Moves the directory to a new location |
|
name ( ) : string |
Returns the name of the directory without the full path |
|
niceSize ( ) : string |
Returns the size as a human-readable string |
|
parent ( ) : Directory |
Returns the parent directory object |
|
read ( array $ignore = null ) : array |
Alternative for scan |
|
remove ( boolean $keep = false ) : boolean |
Alternative for delete |
|
root ( ) |
Returns the root of the directory |
|
scan ( array $ignore = null ) : array |
Reads the directory content and returns an array with file objects |
|
size ( ) : integer |
Returns the entire size of the directory and all its contents |
|
type ( ) : string |
Corresponding method to File::type()
which makes it possible to filter a collection
of files and directories by type. |
|
zip ( string $to ) |
Zip the current directory |
|