PHP Class App\services\Storage

Afficher le fichier Open project: printempw/blessing-skin-server Class Usage Examples

Méthodes publiques

Méthode Description
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 )

Method Details

copyDir() public static méthode

Copy directory recursively
public static copyDir ( string $source, string $dest ) : boolean
$source string
$dest string
Résultat boolean

exists() public static méthode

public static exists ( $filename )

get() public static méthode

Read a file and return bin data
public static get ( string $filename ) : string | boolean
$filename string
Résultat string | boolean

getDirSize() public static méthode

Recursively count the size of specified directory
public static getDirSize ( string $dir ) : int,
$dir string
Résultat int,

getFileNum() public static méthode

Recursively count files of specified directory
public static getFileNum ( string $dir, $file_num ) : int,
$dir string
$file_num
Résultat int,

hash() public static méthode

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

put() public static méthode

public static put ( $filename, $data )

remove() public static méthode

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

removeDir() public static méthode

public static removeDir ( $dir )

rename() public static méthode

public static rename ( $fname, $new_fname )

size() public static méthode

public static size ( $filename )