From e0eed484e92a7f2c0dd107f6c889ba579b32d830 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Tue, 1 Aug 2023 15:50:01 +0700 Subject: [PATCH] Remove Echo Debug --- system/autoload/File.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/system/autoload/File.php b/system/autoload/File.php index d704f240..60d256bb 100644 --- a/system/autoload/File.php +++ b/system/autoload/File.php @@ -5,21 +5,17 @@ class File public static function copyFolder($from, $to, $exclude = []) { - echo "copyFolder($from, $to);
"; $files = scandir($from); print_r($files); foreach ($files as $file) { if (is_file($from . $file) && !in_array($file, $exclude)) { if (file_exists($to . $file)) unlink($to . $file); rename($from . $file, $to . $file); - echo "rename($from$file, $to$file);
"; } else if (is_dir($from . $file) && !in_array($file, ['.', '..'])) { if (!file_exists($to . $file)) { - echo "mkdir($to$file);;
"; mkdir($to . $file); } - echo "File::copyFolder($from$file, $to$file);
"; - File::copyFolder($from . $file . DIRECTORY_SEPARATOR, $to . $file . DIRECTORY_SEPARATOR); + File::copyFolder($from . $file . DIRECTORY_SEPARATOR, $to . $file . DIRECTORY_SEPARATOR, $exclude); } } } @@ -29,15 +25,12 @@ class File $files = scandir($path); foreach ($files as $file) { if (is_file($path . $file)) { - echo "unlink($path$file);
"; unlink($path . $file); } else if (is_dir($path . $file) && !in_array($file, ['.', '..'])) { File::deleteFolder($path . $file . DIRECTORY_SEPARATOR); - echo "rmdir($path$file);
"; rmdir($path . $file); } } - echo "rmdir($path);
"; rmdir($path); }