PHP 클래스 dir, kirby

This class makes it easy to create/edit/delete directories on the filesystem
파일 보기 프로젝트 열기: bastianallgeier/kirby 1 사용 예제들

공개 메소드들

메소드 설명
clean ( string $dir ) : boolean Flushes a directory
inspect ( string $dir ) : mixed Reads a directory and returns a full set of info about it
make ( string $dir ) : boolean Creates a new directory
modified ( string $dir, integer $modified ) : integer Recursively check when the dir and all subfolders have been modified for the last time.
move ( string $old, string $new ) : boolean Moves a directory to a new location
read ( string $dir ) : mixed Reads all files from a directory and returns them as an array.
remove ( string $dir, boolean $keep = false ) : boolean Deletes a directory
size ( $path, boolean $recursive = true, boolean $nice = false ) : mixed Gets the size of the directory and all subfolders and files

메소드 상세

clean() 정적인 공개 메소드

Flushes a directory
static public clean ( string $dir ) : boolean
$dir string The path of the directory
리턴 boolean True: the directory has been flushed, false: flushing failed

inspect() 정적인 공개 메소드

Reads a directory and returns a full set of info about it
static public inspect ( string $dir ) : mixed
$dir string The path of directory
리턴 mixed An info array or false

make() 정적인 공개 메소드

Creates a new directory
static public make ( string $dir ) : boolean
$dir string The path for the new directory
리턴 boolean True: the dir has been created, false: creating failed

modified() 정적인 공개 메소드

Recursively check when the dir and all subfolders have been modified for the last time.
static public modified ( string $dir, integer $modified ) : integer
$dir string The path of the directory
$modified integer internal modified store
리턴 integer

move() 정적인 공개 메소드

Moves a directory to a new location
static public move ( string $old, string $new ) : boolean
$old string The current path of the directory
$new string The desired path where the dir should be moved to
리턴 boolean True: the directory has been moved, false: moving failed

read() 정적인 공개 메소드

It skips unwanted invisible stuff.
static public read ( string $dir ) : mixed
$dir string The path of directory
리턴 mixed An array of filenames or false

remove() 정적인 공개 메소드

Deletes a directory
static public remove ( string $dir, boolean $keep = false ) : boolean
$dir string The path of the directory
$keep boolean If set to true, the directory will flushed but not removed.
리턴 boolean True: the directory has been removed, false: removing failed

size() 정적인 공개 메소드

Gets the size of the directory and all subfolders and files
static public size ( $path, boolean $recursive = true, boolean $nice = false ) : mixed
$recursive boolean
$nice boolean returns the size in a human readable size
리턴 mixed