Update storage.php

This commit is contained in:
Namhyeon Go 2019-01-05 15:43:35 +09:00 committed by GitHub
parent 63df2333dd
commit d868a32eab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,6 +173,26 @@ if(!function_exists("read_storage_file")) {
}
}
if(!function_exists("iterate_storage_Files")) {
function iterate_storage_files($storage_type, $options=array()) {
$filenames = array();
$excludes = array(".", "..");
$storage_path = get_storage_path($type);
if(is_dir($storage_path)) {
if($handle = opendir($storage_path)) {
while(false !== ($file = readdir($handle))) {
if(!in_array($file, $excludes)) {
$filenames[] = $file;
}
}
}
}
return $filenames;
}
if(!function_exists("remove_storage_file")) {
function remove_storage_file($filename, $options=array()) {
$result = false;