/** * ディレクトリの一括削除 * @param string $dir ディレクトリパス */ static function remove_dir($dir) { if ($handle = @opendir("{$dir}")) { while (false !== ($item = readdir($handle))) { if ($item != "." && $item != "..") { if (is_dir($dir . '/' . $item)) { ACSLib::remove_dir($dir . '/' . $item); } else { unlink($dir . '/' . $item); } } } closedir($handle); rmdir($dir); } }
/** * ワークディレクトリの初期化 */ function clean_work_dir() { ACSLib::remove_dir($this->contents_dir); }
/** * ワークディレクトリ・ファイルの消去 */ function clear_work_dir_and_files() { ACSLib::remove_dir($this->zip_work_dir); }