git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4519 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2008-09-18 10:11:46 +00:00
parent 5c7547f430
commit 28163b1312

View file

@ -180,8 +180,20 @@
* @biref 지정된 디렉토리를 제외한 모든 파일을 삭제
**/
function removeFilesInDir($path) {
FileHandler::removedir($path);
FileHandler::makeDir($path);
$path = FileHandler::getRealPath($path);
if(!is_dir($path)) return;
$directory = dir($path);
while($entry = $directory->read()) {
if ($entry != "." && $entry != "..") {
if (is_dir($path."/".$entry)) {
FileHandler::removeFilesInDir($path."/".$entry);
} else {
@unlink($path."/".$entry);
}
}
}
$directory->close();
@rmdir($path);
}
/**