コード例 #1
0
 /**
  * Scans folder and adds all folders to array.
  *
  * @param string $path folder path
  * @return array founded folders in array
  */
 function get_folders($path)
 {
     $folders = gdFunctionsGDSR::scan_dir($path);
     $import = array();
     foreach ($folders as $folder) {
         if (substr($folder, 0, 1) != ".") {
             if (is_dir($path . $folder . "/")) {
                 $import[] = $folder;
             }
         }
     }
     return $import;
 }
コード例 #2
0
ファイル: gfx_lib.php プロジェクト: TheReaCompany/pooplog
 function scan_folder()
 {
     $files = gdFunctionsGDSR::scan_dir($this->gfx_path);
     $this->sizes = array();
     foreach ($files as $file) {
         $fparts = explode(".", $file);
         if ($fparts[1] == $this->type) {
             $size = substr($fparts[0], -2);
             $this->sizes[] = $size;
         }
     }
 }