示例#1
0
 public static function get_file_listing($path)
 {
     if (!is_dir($path)) {
         return false;
     }
     $files = array_merge(glob("{$path}/*"), glob("{$path}/.*"));
     $contents = array();
     foreach ((array) $files as $file) {
         if (in_array(basename($file), array('.', '..'))) {
             continue;
         }
         if (is_dir($file)) {
             $contents[basename($file)] = ITFileUtility::get_file_listing($file);
         } else {
             if (is_file($file)) {
                 $contents[basename($file)] = true;
             }
         }
     }
     return $contents;
 }
示例#2
0
 function get_file_listing()
 {
     if (empty($this->_path)) {
         return false;
     }
     return ITFileUtility::get_file_listing($this->_path);
 }