|
|
@ -1206,7 +1206,7 @@ class FileService { |
|
|
} |
|
|
} |
|
|
if (is_file($currentItem)) { |
|
|
if (is_file($currentItem)) { |
|
|
$pathInfo = pathinfo($currentItem); |
|
|
$pathInfo = pathinfo($currentItem); |
|
|
if (in_array($pathInfo[PATHINFO_EXTENSION], $extensions)) { |
|
|
|
|
|
|
|
|
if (in_array($pathInfo["extension"], $extensions)) { |
|
|
dump("now delete file $currentItem"); |
|
|
dump("now delete file $currentItem"); |
|
|
unlink($currentItem); |
|
|
unlink($currentItem); |
|
|
} |
|
|
} |
|
|
@ -1231,7 +1231,7 @@ class FileService { |
|
|
} |
|
|
} |
|
|
if (is_file($currentItem)) { |
|
|
if (is_file($currentItem)) { |
|
|
$pathInfo = pathinfo($currentItem); |
|
|
$pathInfo = pathinfo($currentItem); |
|
|
if ($pathInfo[PATHINFO_EXTENSION] == $fromExtension) { |
|
|
|
|
|
|
|
|
if ($pathInfo["extension"] == $fromExtension) { |
|
|
$newFile = str_replace($fromExtension, $toExtension, $currentItem); |
|
|
$newFile = str_replace($fromExtension, $toExtension, $currentItem); |
|
|
dump("now rename file $currentItem to $newFile"); |
|
|
dump("now rename file $currentItem to $newFile"); |
|
|
rename($currentItem, $newFile); |
|
|
rename($currentItem, $newFile); |
|
|
@ -1246,7 +1246,7 @@ class FileService { |
|
|
{ |
|
|
{ |
|
|
if (is_file($file)) { |
|
|
if (is_file($file)) { |
|
|
$pathInfo = pathinfo($file); |
|
|
$pathInfo = pathinfo($file); |
|
|
if ($pathInfo[PATHINFO_EXTENSION] == $fromExtension) { |
|
|
|
|
|
|
|
|
if ($pathInfo["extension"] == $fromExtension) { |
|
|
$newFile = str_replace($fromExtension, $toExtension, $file); |
|
|
$newFile = str_replace($fromExtension, $toExtension, $file); |
|
|
dump("now rename file $file to $newFile"); |
|
|
dump("now rename file $file to $newFile"); |
|
|
rename($file, $newFile); |
|
|
rename($file, $newFile); |
|
|
|