Draft local file/dir object

This commit is contained in:
Dennis Eichhorn 2017-11-28 16:45:13 +01:00
parent 688a88701e
commit 217ca52f89
2 changed files with 12 additions and 16 deletions

View File

@ -534,7 +534,7 @@ class Directory extends FileAbstract implements DirectoryInterface
*/ */
public function getParent() : ContainerInterface public function getParent() : ContainerInterface
{ {
// TODO: Implement getParent() method. return new self(self::parent($this->path));
} }
/** /**
@ -542,7 +542,7 @@ class Directory extends FileAbstract implements DirectoryInterface
*/ */
public function copyNode(string $to, bool $overwrite = false) : bool public function copyNode(string $to, bool $overwrite = false) : bool
{ {
// TODO: Implement copyNode() method. return self::copy($this->path, $to, $overwrite);
} }
/** /**
@ -550,7 +550,7 @@ class Directory extends FileAbstract implements DirectoryInterface
*/ */
public function moveNode(string $to, bool $overwrite = false) : bool public function moveNode(string $to, bool $overwrite = false) : bool
{ {
// TODO: Implement moveNode() method. return self::move($this->path, $to, $overwrite);
} }
/** /**
@ -558,17 +558,13 @@ class Directory extends FileAbstract implements DirectoryInterface
*/ */
public function deleteNode() : bool public function deleteNode() : bool
{ {
// TODO: Implement deleteNode() method. return self::delete($this->path);
// todo: remove from node list
} }
/** /**
* Offset to retrieve * {@inheritdoc}
* @link http://php.net/manual/en/arrayaccess.offsetget.php
* @param mixed $offset <p>
* The offset to retrieve.
* </p>
* @return mixed Can return all value types.
* @since 5.0.0
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {

View File

@ -419,7 +419,7 @@ class File extends FileAbstract implements FileInterface
*/ */
public function getParent() : ContainerInterface public function getParent() : ContainerInterface
{ {
// TODO: Implement getParent() method. return new Directory(self::parent($this->path));
} }
/** /**
@ -427,7 +427,7 @@ class File extends FileAbstract implements FileInterface
*/ */
public function copyNode(string $to, bool $overwrite = false) : bool public function copyNode(string $to, bool $overwrite = false) : bool
{ {
// TODO: Implement copyNode() method. return self::copy($this->path, $to, $overwrite);
} }
/** /**
@ -435,7 +435,7 @@ class File extends FileAbstract implements FileInterface
*/ */
public function moveNode(string $to, bool $overwrite = false) : bool public function moveNode(string $to, bool $overwrite = false) : bool
{ {
// TODO: Implement moveNode() method. return self::move($this->path, $to, $overwrite);
} }
/** /**
@ -443,7 +443,7 @@ class File extends FileAbstract implements FileInterface
*/ */
public function deleteNode() : bool public function deleteNode() : bool
{ {
// TODO: Implement deleteNode() method. return self::delete($this->path);
} }
/** /**
@ -451,7 +451,7 @@ class File extends FileAbstract implements FileInterface
*/ */
public function putContent(string $content, int $mode = ContentPutMode::APPEND | ContentPutMode::CREATE) : bool public function putContent(string $content, int $mode = ContentPutMode::APPEND | ContentPutMode::CREATE) : bool
{ {
// TODO: Implement putContent() method. return self::put($this->path, $content, $mode);
} }
/** /**