mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-12 14:58:42 +00:00
Fixing includes and naming
This commit is contained in:
parent
635ea38f7f
commit
a4938066f4
|
|
@ -16,6 +16,7 @@
|
||||||
namespace phpOMS\System\File\Local;
|
namespace phpOMS\System\File\Local;
|
||||||
|
|
||||||
use phpOMS\System\File\DirectoryInterface;
|
use phpOMS\System\File\DirectoryInterface;
|
||||||
|
use phpOMS\System\File\PathException;
|
||||||
use phpOMS\Utils\StringUtils;
|
use phpOMS\Utils\StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -190,7 +191,7 @@ class Directory extends FileAbstract implements DirectoryInterface
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
*/
|
*/
|
||||||
public static function deletePath($path) : bool
|
public static function delete(string $path) : bool
|
||||||
{
|
{
|
||||||
$path = realpath($oldPath = $path);
|
$path = realpath($oldPath = $path);
|
||||||
if ($path === false || !is_dir($path) || StringUtils::startsWith($path, ROOT_PATH)) {
|
if ($path === false || !is_dir($path) || StringUtils::startsWith($path, ROOT_PATH)) {
|
||||||
|
|
@ -205,7 +206,7 @@ class Directory extends FileAbstract implements DirectoryInterface
|
||||||
|
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
if (is_dir($file)) {
|
if (is_dir($file)) {
|
||||||
self::deletePath($file);
|
self::delete($file);
|
||||||
} else {
|
} else {
|
||||||
unlink($file);
|
unlink($file);
|
||||||
}
|
}
|
||||||
|
|
@ -256,11 +257,6 @@ class Directory extends FileAbstract implements DirectoryInterface
|
||||||
|
|
||||||
/* Iterator */
|
/* Iterator */
|
||||||
|
|
||||||
public static function delete(string $path) : bool
|
|
||||||
{
|
|
||||||
// TODO: Implement delete() method.
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function copy(string $from, string $to, bool $overwrite = false) : bool
|
public static function copy(string $from, string $to, bool $overwrite = false) : bool
|
||||||
{
|
{
|
||||||
// TODO: Implement copy() method.
|
// TODO: Implement copy() method.
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
*/
|
*/
|
||||||
namespace phpOMS\System\File\Local;
|
namespace phpOMS\System\File\Local;
|
||||||
use phpOMS\System\File\FileInterface;
|
use phpOMS\System\File\FileInterface;
|
||||||
|
use phpOMS\System\File\PathException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filesystem class.
|
* Filesystem class.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user