Skip to content

Commit

Permalink
allow passing more info to lazy folder
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Aug 14, 2023
1 parent aefc3f8 commit 7820c16
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/private/Files/Node/LazyFolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ public function getInternalPath() {
* @inheritDoc
*/
public function getId() {
if (isset($this->data['fileid'])) {
return $this->data['fileid'];
}
return $this->__call(__FUNCTION__, func_get_args());
}

Expand All @@ -221,20 +224,29 @@ public function stat() {
* @inheritDoc
*/
public function getMTime() {
if (isset($this->data['mtime'])) {
return $this->data['mtime'];
}
return $this->__call(__FUNCTION__, func_get_args());
}

/**
* @inheritDoc
*/
public function getSize($includeMounts = true): int|float {
if (isset($this->data['size'])) {
return $this->data['size'];
}
return $this->__call(__FUNCTION__, func_get_args());
}

/**
* @inheritDoc
*/
public function getEtag() {
if (isset($this->data['etag'])) {
return $this->data['etag'];
}
return $this->__call(__FUNCTION__, func_get_args());
}

Expand Down Expand Up @@ -299,6 +311,12 @@ public function getParent() {
* @inheritDoc
*/
public function getName() {
if (isset($this->data['path'])) {
return basename($this->data['path']);
}
if (isset($this->data['name'])) {
return $this->data['name'];
}
return $this->__call(__FUNCTION__, func_get_args());
}

Expand Down

0 comments on commit 7820c16

Please sign in to comment.