Lines Matching refs:path

15     static function exists(Path $path): bool  argument
17 $scheme = $path->getScheme();
20 return LocalFileSystem::getOrCreate()->exists($path);
22 return WikiFileSystem::getOrCreate()->exists($path);
24 return MarkupFileSystem::getOrCreate()->exists($path);
33 public static function getContent(Path $path): string argument
35 $scheme = $path->getScheme();
38 return LocalFileSystem::getOrCreate()->getContent($path);
40 return WikiFileSystem::getOrCreate()->getContent($path);
48 public static function getModifiedTime(Path $path): \DateTime argument
50 $scheme = $path->getScheme();
54 return LocalFileSystem::getOrCreate()->getModifiedTime($path);
56 return WikiFileSystem::getOrCreate()->getModifiedTime($path);
66 public static function getCreationTime(Path $path) argument
68 $scheme = $path->getScheme();
71 return LocalFileSystem::getOrCreate()->getCreationTime($path);
73 return WikiFileSystem::getOrCreate()->getCreationTime($path);
80 public static function deleteIfExists(Path $path) argument
82 if (FileSystems::exists($path)) {
83 FileSystems::delete($path);
90 public static function delete(Path $path) argument
92 $scheme = $path->getScheme();
95 LocalFileSystem::getOrCreate()->delete($path);
98 WikiFileSystem::getOrCreate()->delete($path);
101 MarkupFileSystem::getOrCreate()->delete($path);
108 public static function getSize(Path $path) argument
111 $scheme = $path->getScheme();
114 return LocalFileSystem::getOrCreate()->getSize($path);
116 return WikiFileSystem::getOrCreate()->getSize($path);
139 public static function isDirectory(Path $path): bool argument
141 $scheme = $path->getScheme();
144 return LocalFileSystem::getOrCreate()->isDirectory($path);
146 return WikiFileSystem::getOrCreate()->isDirectory($path);
156 public static function getChildren(Path $path, string $type = null): array argument
158 $scheme = $path->getScheme();
161 return LocalFileSystem::getOrCreate()->getChildren($path, $type);
163 return WikiFileSystem::getOrCreate()->getChildren($path, $type);
165 return MarkupFileSystem::getOrCreate()->getChildren($path, $type);
199 public static function getCacheBuster(Path $path): string argument
201 $time = FileSystems::getModifiedTime($path);
208 public static function closest(Path $path, string $name): Path argument
210 $scheme = $path->getScheme();
213 return LocalFileSystem::getOrCreate()->closest($path, $name);
215 return WikiFileSystem::getOrCreate()->closest($path, $name);
221 public static function createRegularFile(Path $path) argument
223 $scheme = $path->getScheme();
226 LocalFileSystem::getOrCreate()->createRegularFile($path);
229 WikiFileSystem::getOrCreate()->createRegularFile($path);
239 public static function getMime(Path $path): Mime argument
241 $extension = $path->getExtension();
245 $mime = mimetype($path->getLastName(), true)[1];
247 …throw new ExceptionNotFound("No mime found for path ($path). The mime type of the media is <a href…
253 public static function setContent(Path $path, string $content) argument
255 $scheme = $path->getScheme();
258 LocalFileSystem::getOrCreate()->setContent($path, $content);
261 WikiFileSystem::getOrCreate()->setContent($path, $content);
264 MarkupFileSystem::getOrCreate()->setContent($path, $content);
279 foreach ($paths as $path) {
280 if (FileSystems::exists($path)) {
281 return $path;
288 public static function getTree(Path $path): PathTreeNode argument
290 return PathTreeNode::buildTreeViaFileSystemChildren($path);
326 public static function clearStatCache(Path $path) argument
329 $pathString = $path->toLocalPath()->toCanonicalAbsolutePath()->toAbsoluteId();