PHP 클래스 WPDKFilesystem

저자: =undo= ([email protected])
상속: extends WPDKObject
파일 보기 프로젝트 열기: wpxtreme/wpdk 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$__version string Override version

공개 메소드들

메소드 설명
_rglob ( string $path, string $match = '', &$result = [] ) : array Return an array with all matched files from root folder.
append ( string $data, string $filename ) : boolean Append data to a file and return TRUE on successfully, FALSE otherwise.
ext ( string $filename ) : string Return the extension of a filename
fileSize ( string $filename, integer $precision = 2 ) : string | boolean Return the file size (B, KiB, MiB, GiB, TiB, PiB, EiB, ZiB, YiB) well formatted. Return FALSE if file doesn't exists or filesize() failure.
filename ( string $filename ) : string Return the only filename part. if a filename is 'test.black.jpg' will return 'test.black'
recursiveScan ( string $path, string $match = '' ) : array Return an array with all matched files from root folder. This method release the follow filters:

메소드 상세

_rglob() 공개 메소드

Return an array with all matched files from root folder.
public _rglob ( string $path, string $match = '', &$result = [] ) : array
$path string Folder root
$match string Optional. Regex to apply on file name. For example use '/^.*\.(php)$/i' to get only php file
리턴 array

append() 공개 정적인 메소드

Append data to a file and return TRUE on successfully, FALSE otherwise.
부터: 1.7.0
public static append ( string $data, string $filename ) : boolean
$data string Data to append.
$filename string Complete path filename.
리턴 boolean

ext() 공개 정적인 메소드

Return the extension of a filename
또한 보기: filename()
public static ext ( string $filename ) : string
$filename string A comoplete filename
리턴 string

fileSize() 공개 정적인 메소드

Return the file size (B, KiB, MiB, GiB, TiB, PiB, EiB, ZiB, YiB) well formatted. Return FALSE if file doesn't exists or filesize() failure.
public static fileSize ( string $filename, integer $precision = 2 ) : string | boolean
$filename string File name or path to a file
$precision integer Digits to display after decimal
리턴 string | boolean

filename() 공개 정적인 메소드

Return the only filename part. if a filename is 'test.black.jpg' will return 'test.black'
또한 보기: ext()
부터: 1.4.15
public static filename ( string $filename ) : string
$filename string A comoplete filename
리턴 string

recursiveScan() 공개 정적인 메소드

wpdk_rglob_find_dir( true, $file ) - when find a dir wpdk_rglob_find_file( true, $file ) - when find a a file wpdk_rglob_matched( $regexp_result, $file, $match ) - after preg_match() done
부터: 1.0.0.b4
public static recursiveScan ( string $path, string $match = '' ) : array
$path string Folder root
$match string Optional. Regex to apply on file name. For example use '/^.*\.(php)$/i' to get only php file. Default is empty
리턴 array

프로퍼티 상세

$__version 공개적으로 프로퍼티

Override version
public string $__version
리턴 string