mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
Draft local file/dir object
This commit is contained in:
parent
688a88701e
commit
217ca52f89
|
|
@ -534,7 +534,7 @@ class Directory extends FileAbstract implements DirectoryInterface
|
|||
*/
|
||||
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
|
||||
{
|
||||
// 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
|
||||
{
|
||||
// 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
|
||||
{
|
||||
// TODO: Implement deleteNode() method.
|
||||
return self::delete($this->path);
|
||||
|
||||
// todo: remove from node list
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset to retrieve
|
||||
* @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
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ class File extends FileAbstract implements FileInterface
|
|||
*/
|
||||
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
|
||||
{
|
||||
// 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
|
||||
{
|
||||
// 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
|
||||
{
|
||||
// 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
|
||||
{
|
||||
// TODO: Implement putContent() method.
|
||||
return self::put($this->path, $content, $mode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user