MCPcopy Create free account
hub / github.com/error311/FileRise / list

Method list

src/FileRise/Storage/WebDavAdapter.php:112–135  ·  view source on GitHub ↗
(string $path)

Source from the content-addressed store, hash-verified

110 }
111
112 public function list(string $path): array
113 {
114 $props = $this->propFind($path, 1);
115 if (!$props) {
116 return [];
117 }
118 $parentRel = trim($this->relativePath($path), '/');
119 $items = [];
120 $children = [];
121 foreach ($props as $href => $prop) {
122 $rel = trim($this->hrefToRelative((string)$href), '/');
123 if ($rel === '' || $rel === $parentRel) {
124 continue;
125 }
126 $name = basename($rel);
127 if ($name === '' || $name === '.' || $name === '..') {
128 continue;
129 }
130 $items[] = $name;
131 $children[$name] = $this->propsToStat($prop);
132 }
133 $this->storeListCache($parentRel, $children);
134 return array_values(array_unique($items));
135 }
136
137 public function stat(string $path): ?array
138 {

Callers 3

list.phpFile · 0.45
scanPortalEntriesMethod · 0.45
checkMethod · 0.45

Calls 5

propFindMethod · 0.95
relativePathMethod · 0.95
hrefToRelativeMethod · 0.95
propsToStatMethod · 0.95
storeListCacheMethod · 0.95

Tested by

no test coverage detected