mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 22:33:55 -07:00
Update _cleanup.php
This commit is contained in:
parent
68b0b9ad44
commit
ccfcfed7cd
1 changed files with 4 additions and 4 deletions
|
@ -50,9 +50,9 @@ foreach ($items as $item) {
|
|||
function removeFile(string $file): void
|
||||
{
|
||||
if (unlink($file)) {
|
||||
echo "[INFO] File removed: $file" . PHP_EOL;
|
||||
echo "- File removed: $file" . PHP_EOL;
|
||||
} else {
|
||||
echo "[ERROR] File cannot be removed: $file" . PHP_EOL;
|
||||
echo "- File cannot be removed: $file" . PHP_EOL;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
@ -76,9 +76,9 @@ function removeDir(string $dir): void
|
|||
}
|
||||
|
||||
if (rmdir($dir)) {
|
||||
echo "[INFO] Folder removed: $dir" . PHP_EOL;
|
||||
echo "- Folder removed: $dir" . PHP_EOL;
|
||||
} else {
|
||||
echo "[ERROR] Folder cannot be removed: $dir" . PHP_EOL;
|
||||
echo "- Folder cannot be removed: $dir" . PHP_EOL;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue