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

Method stat

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

Source from the content-addressed store, hash-verified

135 }
136
137 public function stat(string $path): ?array
138 {
139 $rel = $this->relativePath($path);
140 if ($rel !== '') {
141 $parentRel = trim(str_replace('\\', '/', dirname($rel)), '/');
142 if ($parentRel === '.' || $parentRel === '') {
143 $parentRel = '';
144 }
145 $base = basename($rel);
146 $cached = $this->getListCache($parentRel);
147 if ($cached !== null && isset($cached[$base])) {
148 return $cached[$base];
149 }
150 }
151
152 $props = $this->propFind($path, 0);
153 if (!$props) {
154 return null;
155 }
156
157 return $this->propsToStat($props);
158 }
159
160 public function read(string $path, ?int $length = null, int $offset = 0): string|false
161 {

Callers 15

configMethod · 0.45
signedDownloadMethod · 0.45
downloadSharedFileMethod · 0.45
saveFileMethod · 0.45
snippetMethod · 0.45
shareFileMethod · 0.45
listPortalEntriesMethod · 0.45
scanPortalEntriesMethod · 0.45
ensureRemoteUploadDirMethod · 0.45
handleUploadMethod · 0.45
checkExistingMethod · 0.45

Calls 4

relativePathMethod · 0.95
getListCacheMethod · 0.95
propFindMethod · 0.95
propsToStatMethod · 0.95

Tested by

no test coverage detected