PHP 클래스 Pop\File\Dir

저자: Nick Sagona, III ([email protected])
파일 보기 프로젝트 열기: nicksagona/PopPHP 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$dirs boolean Flag to include base sub directory listings or just the files.
$files array The files within the directory
$full boolean Flag to store the full path.
$objects array The files within the directory as objects
$path string The directory path
$rec boolean Flag to dig recursively.
$tree array The nested tree map of the directory and its files

공개 메소드들

메소드 설명
__construct ( string $dir, boolean $full = false, boolean $rec = false, boolean $dirs = true ) : Dir Constructor
emptyDir ( string $path = null, boolean $del = false ) : void Empty an entire directory.
getFiles ( ) : array Get the files.
getGroup ( ) : array Get the owner of the file. Works on POSIX file systems only
getObjects ( ) : array Get the files as objects.
getOwner ( ) : array Get the owner of the file. Works on POSIX file systems only
getPath ( ) : string Get the path.
getPermissions ( ) : string Get the permissions of the directory.
getSystemTemp ( ) : string Static method to return the system temp directory.
getTree ( ) : array Get the tree.
getUploadTemp ( ) : string Static method to return the upload temp directory.
getUser ( ) : array Get current user. Works on POSIX file systems only
isDir ( ) : boolean Is dir object.
isFile ( ) : boolean Is file object.
setPermissions ( integer $mode ) : Dir Change the permissions of the directory.

보호된 메소드들

메소드 설명
buildTree ( DirectoryIterator $it ) : array Empty an entire directory.

메소드 상세

__construct() 공개 메소드

Instantiate a directory object
public __construct ( string $dir, boolean $full = false, boolean $rec = false, boolean $dirs = true ) : Dir
$dir string
$full boolean
$rec boolean
$dirs boolean
리턴 Dir

buildTree() 보호된 메소드

Empty an entire directory.
protected buildTree ( DirectoryIterator $it ) : array
$it DirectoryIterator
리턴 array

emptyDir() 공개 메소드

Empty an entire directory.
public emptyDir ( string $path = null, boolean $del = false ) : void
$path string
$del boolean
리턴 void

getFiles() 공개 메소드

Get the files.
public getFiles ( ) : array
리턴 array

getGroup() 공개 메소드

Get the owner of the file. Works on POSIX file systems only
public getGroup ( ) : array
리턴 array

getObjects() 공개 메소드

Get the files as objects.
public getObjects ( ) : array
리턴 array

getOwner() 공개 메소드

Get the owner of the file. Works on POSIX file systems only
public getOwner ( ) : array
리턴 array

getPath() 공개 메소드

Get the path.
public getPath ( ) : string
리턴 string

getPermissions() 공개 메소드

Get the permissions of the directory.
public getPermissions ( ) : string
리턴 string

getSystemTemp() 공개 정적인 메소드

Static method to return the system temp directory.
public static getSystemTemp ( ) : string
리턴 string

getTree() 공개 메소드

Get the tree.
public getTree ( ) : array
리턴 array

getUploadTemp() 공개 정적인 메소드

Static method to return the upload temp directory.
public static getUploadTemp ( ) : string
리턴 string

getUser() 공개 메소드

Get current user. Works on POSIX file systems only
public getUser ( ) : array
리턴 array

isDir() 공개 메소드

Is dir object.
public isDir ( ) : boolean
리턴 boolean

isFile() 공개 메소드

Is file object.
public isFile ( ) : boolean
리턴 boolean

setPermissions() 공개 메소드

Change the permissions of the directory.
public setPermissions ( integer $mode ) : Dir
$mode integer
리턴 Dir

프로퍼티 상세

$dirs 보호되어 있는 프로퍼티

Flag to include base sub directory listings or just the files.
protected bool $dirs
리턴 boolean

$files 보호되어 있는 프로퍼티

The files within the directory
protected array $files
리턴 array

$full 보호되어 있는 프로퍼티

Flag to store the full path.
protected bool $full
리턴 boolean

$objects 보호되어 있는 프로퍼티

The files within the directory as objects
protected array $objects
리턴 array

$path 보호되어 있는 프로퍼티

The directory path
protected string $path
리턴 string

$rec 보호되어 있는 프로퍼티

Flag to dig recursively.
protected bool $rec
리턴 boolean

$tree 보호되어 있는 프로퍼티

The nested tree map of the directory and its files
protected array $tree
리턴 array