PHP 클래스 App\services\Storage

파일 보기 프로젝트 열기: printempw/blessing-skin-server 1 사용 예제들

공개 메소드들

메소드 설명
copyDir ( string $source, string $dest ) : boolean Copy directory recursively
exists ( $filename )
get ( string $filename ) : string | boolean Read a file and return bin data
getDirSize ( string $dir ) : int, Recursively count the size of specified directory
getFileNum ( string $dir, $file_num ) : int, Recursively count files of specified directory
hash ( $filename, $type = 'sha256' )
put ( $filename, $data )
remove ( $filename ) Remove a file
removeDir ( $dir )
rename ( $fname, $new_fname )
size ( $filename )

메소드 상세

copyDir() 공개 정적인 메소드

Copy directory recursively
public static copyDir ( string $source, string $dest ) : boolean
$source string
$dest string
리턴 boolean

exists() 공개 정적인 메소드

public static exists ( $filename )

get() 공개 정적인 메소드

Read a file and return bin data
public static get ( string $filename ) : string | boolean
$filename string
리턴 string | boolean

getDirSize() 공개 정적인 메소드

Recursively count the size of specified directory
public static getDirSize ( string $dir ) : int,
$dir string
리턴 int,

getFileNum() 공개 정적인 메소드

Recursively count files of specified directory
public static getFileNum ( string $dir, $file_num ) : int,
$dir string
$file_num
리턴 int,

hash() 공개 정적인 메소드

public static hash ( $filename, $type = 'sha256' )

put() 공개 정적인 메소드

public static put ( $filename, $data )

remove() 공개 정적인 메소드

Remove a file
public static remove ( $filename )
$filename

removeDir() 공개 정적인 메소드

public static removeDir ( $dir )

rename() 공개 정적인 메소드

public static rename ( $fname, $new_fname )

size() 공개 정적인 메소드

public static size ( $filename )