PHP Класс Folder

This class has been auto-generated by the Doctrine ORM Framework
Автор: Your name here
Наследование: extends BaseFolder
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$inventory a cache for the scanned inventory
$root the root for the directory

Открытые методы

Метод Описание
__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

Описание методов

__construct() публичный Метод

Constructor
public __construct ( $root )

__toString() публичный Метод

Makes it possible to echo the entire object
public __toString ( ) : string
Результат string

child() публичный Метод

Returns a subfolder object by path
public child ( $path ) : mixed
Результат mixed Directory

children() публичный Метод

Return a collection of subfolders
public children ( array $ignore = null, boolean $plain = false ) : mixed
$ignore array
$plain boolean
Результат mixed If $plain is true an array will be returned. Otherwise a Collection

clean() публичный Метод

Alternative for flush
public clean ( ) : boolean
Результат boolean

content() публичный Метод

Returns a collection with full File and Directory objects for each item in the directory
public content ( array $ignore = null ) : Collection
$ignore array
Результат Collection

copy() публичный Метод

Copies the directory to a new location
public copy ( string $to ) : boolean
$to string
Результат boolean

create() публичный Метод

Alternative for make
public create ( boolean $recursive = true ) : boolean
$recursive boolean
Результат boolean

delete() публичный Метод

Deletes the directory
public delete ( boolean $keep = false ) : boolean
$keep boolean Set this to true to keep the directory but delete all its content
Результат boolean

exists() публичный Метод

Checks if the dir exists
public exists ( ) : boolean
Результат boolean

files() публичный Метод

Return a collection of all files within the directory
public files ( array $ignore = null, boolean $plain = false ) : mixed
$ignore array
$plain boolean
Результат mixed When $plain is true an array will be returned. Otherwise a Collection

flush() публичный Метод

Deletes all contents of the directory
public flush ( ) : boolean
Результат boolean

hash() публичный Метод

Returns a md5 hash of the root
public hash ( )

inventory() публичный Метод

Returns the entire content of the directory
public inventory ( ) : array
Результат array

isReadable() публичный Метод

Checks if the directory is readable
public isReadable ( ) : boolean
Результат boolean

isWritable() публичный Метод

Checks if the directory is writable
public isWritable ( boolean $recursive = false ) : boolean
$recursive boolean
Результат boolean

make() публичный Метод

Creates the directory if it does not exist yet
public make ( boolean $recursive = true ) : boolean
$recursive boolean
Результат boolean

modified() публичный Метод

Recursively check when the dir and all subfolders have been modified for the last time.
public modified ( $format = null, $handler = 'date' ) : integer
Результат integer

move() публичный Метод

Moves the directory to a new location
public move ( string $to ) : boolean
$to string
Результат boolean

name() публичный Метод

Returns the name of the directory without the full path
public name ( ) : string
Результат string

niceSize() публичный Метод

Returns the size as a human-readable string
public niceSize ( ) : string
Результат string

parent() публичный Метод

Returns the parent directory object
public parent ( ) : Directory
Результат Directory

read() публичный Метод

Alternative for scan
public read ( array $ignore = null ) : array
$ignore array
Результат array

remove() публичный Метод

Alternative for delete
public remove ( boolean $keep = false ) : boolean
$keep boolean Set this to true to keep the directory but delete all its content
Результат boolean

root() публичный Метод

Returns the root of the directory
public root ( )

scan() публичный Метод

Reads the directory content and returns an array with file objects
public scan ( array $ignore = null ) : array
$ignore array
Результат array

size() публичный Метод

Returns the entire size of the directory and all its contents
public size ( ) : integer
Результат integer

type() публичный Метод

Corresponding method to File::type() which makes it possible to filter a collection of files and directories by type.
public type ( ) : string
Результат string

zip() публичный Метод

Zip the current directory
public zip ( string $to )
$to string The path to the zip file

Описание свойств

$inventory защищенное свойство

a cache for the scanned inventory
protected $inventory

$root защищенное свойство

the root for the directory
protected $root