PHP 클래스 Kahlan\Dir\Dir

상속: extends FilterIterator
파일 보기 프로젝트 열기: crysalead/kahlan 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_exclude array List of exclude patterns
$_include array List of include patterns
$_types array List of allowed types

공개 메소드들

메소드 설명
_dirFlags ( array $options ) : integer Returns FilesystemIterator flags from Dir options.
_iteratorFlags ( array $options ) : integer Returns RecursiveIteratorIterator flags from Dir options.
accept ( ) : boolean Checks if a file passes the setted filters.
copy ( array | string $path, string $dest, array $options = [] ) : array Copies a directory.
filter ( array $options = [] ) Applies some filters to a FilterIterator instance.
make ( array | string $path, array $options = [] ) : boolean Creates a directory.
remove ( array | string $path, array $options = [] ) Removes one or many directories.
scan ( array | string $path, array $options = [] ) : array Scans one or many directories for files.
tempnam ( string $path = null, string $prefix = '' ) : string Creates a directory with unique file name.

보호된 메소드들

메소드 설명
_copy ( string $path, string $dest, array $options ) : array Copies a directory.
_excluded ( $path ) : boolean Checks if a file passes match an excluded path.
_included ( $path ) : boolean Checks if a file passes match an included path.
_matchType ( ) : boolean Checks if a file passes match the allowed type.
_scan ( string $path, array $options, $dirFlags, $iteratorFlags ) : array Scans a given directory for files.

메소드 상세

_copy() 보호된 정적인 메소드

Copies a directory.
protected static _copy ( string $path, string $dest, array $options ) : array
$path string Source directory.
$dest string Destination directory.
$options array Scanning options. Possible values are: -`'mode'` _integer_ : Mode used for directory creation. -`'childrenOnly'` _boolean_ : Excludes parent directory if `true`. -`'followSymlinks'` _boolean_ : Follows Symlinks if `true`. -`'recursive'` _boolean_ : Scans recursively if `true`. -`'include'` _string|array_: An array of includes. -`'exclude'` _string|array_: An array of excludes.
리턴 array

_dirFlags() 공개 정적인 메소드

Returns FilesystemIterator flags from Dir options.
public static _dirFlags ( array $options ) : integer
$options array Scanning options. Possible values are: -`'skipDots'` _boolean_ : Keeps '.' and '..' if `true`. -`'followSymlinks'` _boolean_ : Follows Symlinks if `true`.
리턴 integer Some `FilesystemIterator` flags

_excluded() 보호된 메소드

Checks if a file passes match an excluded path.
protected _excluded ( $path ) : boolean
리턴 boolean Returns `true` if match an excluded path, `false` otherwise.

_included() 보호된 메소드

Checks if a file passes match an included path.
protected _included ( $path ) : boolean
리턴 boolean Returns `true` if match an included path, `false` otherwise.

_iteratorFlags() 공개 정적인 메소드

Returns RecursiveIteratorIterator flags from Dir options.
public static _iteratorFlags ( array $options ) : integer
$options array Scanning options. Possible values are: -`'iterator'` _integer_ : The iterator mode. -`'leavesOnly'` _boolean_ : Keeps only leaves if `true`.
리턴 integer Some `RecursiveIteratorIterator` flags

_matchType() 보호된 메소드

Checks if a file passes match the allowed type.
protected _matchType ( ) : boolean
리턴 boolean Returns `true` if match the allowed type, `false` otherwise.

_scan() 보호된 정적인 메소드

Scans a given directory for files.
protected static _scan ( string $path, array $options, $dirFlags, $iteratorFlags ) : array
$path string Path or paths to scan.
$options array Scanning options. Possible values are: -`'iterator'` _integer_ : The iterator mode. -`'skipDots'` _boolean_ : Keeps '.' and '..' if `true`. -`'leavesOnly'` _boolean_ : Keeps only leaves if `true`. -`'followSymlinks'` _boolean_ : Follows Symlinks if `true`. -`'recursive'` _boolean_ : Scans recursively if `true`. -`'include'` _string|array_: An array of includes. -`'exclude'` _string|array_: An array of excludes. -`'type'` _string|array_: An array of types.
리턴 array

accept() 공개 메소드

Checks if a file passes the setted filters.
public accept ( ) : boolean
리턴 boolean

copy() 공개 정적인 메소드

Copies a directory.
public static copy ( array | string $path, string $dest, array $options = [] ) : array
$path array | string Source directory.
$dest string Destination directory.
$options array Scanning options. Possible values are: -`'mode'` _integer_ : Mode used for directory creation. -`'childrenOnly'` _boolean_ : Excludes parent directory if `true`. -`'followSymlinks'` _boolean_ : Follows Symlinks if `true`. -`'recursive'` _boolean_ : Scans recursively if `true`.
리턴 array

filter() 공개 메소드

Applies some filters to a FilterIterator instance.
public filter ( array $options = [] )
$options array The filters optoins. Possible values are: -`'include'` _string|array_: An array of includes. -`'exclude'` _string|array_: An array of excludes. -`'type'` _string|array_: An array of types.

make() 공개 정적인 메소드

Creates a directory.
public static make ( array | string $path, array $options = [] ) : boolean
$path array | string The directory path.
$options array Possible options values are: -`'mode'` _integer_ : Mode used for directory creation. -`'recursive'` _boolean_ : Scans recursively if `true`.
리턴 boolean

remove() 공개 정적인 메소드

Removes one or many directories.
public static remove ( array | string $path, array $options = [] )
$path array | string Path or paths to scan.
$options array Scanning options. Possible values are: -`'followSymlinks'` _boolean_ : Follows Symlinks if `true`. -`'recursive'` _boolean_ : Scans recursively if `true`.

scan() 공개 정적인 메소드

Scans one or many directories for files.
public static scan ( array | string $path, array $options = [] ) : array
$path array | string Path or paths to scan.
$options array Scanning options. Possible values are: -`'iterator'` _integer_ : The iterator mode. -`'skipDots'` _boolean_ : Keeps '.' and '..' if `true`. -`'leavesOnly'` _boolean_ : Keeps only leaves if `true`. -`'followSymlinks'` _boolean_ : Follows Symlinks if `true`. -`'recursive'` _boolean_ : Scans recursively if `true`. -`'include'` _string|array_: An array of includes. -`'exclude'` _string|array_: An array of excludes. -`'type'` _string|array_: An array of types.
리턴 array

tempnam() 공개 정적인 메소드

Creates a directory with unique file name.
또한 보기: http://php.net/manual/en/function.tempnam.php
public static tempnam ( string $path = null, string $prefix = '' ) : string
$path string The directory where the temporary filename will be created.
$prefix string The prefix of the generated temporary filename.
리턴 string

프로퍼티 상세

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

List of exclude patterns
protected array $_exclude
리턴 array

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

List of include patterns
protected array $_include
리턴 array

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

List of allowed types
protected array $_types
리턴 array