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