PHP 클래스 Folder

This class has been auto-generated by the Doctrine ORM Framework
저자: Your name here
상속: extends BaseFolder
파일 보기 프로젝트 열기: getkirby/toolkit 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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