/** * 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; }
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; } } }