mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 00:02:21 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4519 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5c7547f430
commit
28163b1312
1 changed files with 14 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue