chore: code styling via pint
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
<?php
|
||||
function deleteFiles($dir) {
|
||||
|
||||
function deleteFiles($dir)
|
||||
{
|
||||
// Open the directory
|
||||
if ($handle = opendir($dir)) {
|
||||
// Loop through each file in the directory
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if ($file != "." && $file != "..") {
|
||||
$filePath = $dir . DIRECTORY_SEPARATOR . $file;
|
||||
if ($file != '.' && $file != '..') {
|
||||
$filePath = $dir.DIRECTORY_SEPARATOR.$file;
|
||||
// If it's a directory, recursively call deleteFiles
|
||||
if (is_dir($filePath)) {
|
||||
deleteFiles($filePath);
|
||||
@@ -38,4 +40,3 @@ if (is_dir($folderPath)) {
|
||||
} else {
|
||||
echo "Folder '$folderPath' does not exist or is not a directory.";
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user