Fixing includes and naming

This commit is contained in:
Dennis Eichhorn 2016-08-21 20:12:39 +02:00
parent 635ea38f7f
commit a4938066f4
2 changed files with 4 additions and 7 deletions

View File

@ -16,6 +16,7 @@
namespace phpOMS\System\File\Local;
use phpOMS\System\File\DirectoryInterface;
use phpOMS\System\File\PathException;
use phpOMS\Utils\StringUtils;
/**
@ -190,7 +191,7 @@ class Directory extends FileAbstract implements DirectoryInterface
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
public static function deletePath($path) : bool
public static function delete(string $path) : bool
{
$path = realpath($oldPath = $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) {
if (is_dir($file)) {
self::deletePath($file);
self::delete($file);
} else {
unlink($file);
}
@ -256,11 +257,6 @@ class Directory extends FileAbstract implements DirectoryInterface
/* Iterator */
public static function delete(string $path) : bool
{
// TODO: Implement delete() method.
}
public static function copy(string $from, string $to, bool $overwrite = false) : bool
{
// TODO: Implement copy() method.

View File

@ -15,6 +15,7 @@
*/
namespace phpOMS\System\File\Local;
use phpOMS\System\File\FileInterface;
use phpOMS\System\File\PathException;
/**
* Filesystem class.