Lines Matching refs:path
119 * @param string $path - the path (may be relative)
132 protected function __construct(string $path, string $drive, string $rev = null) argument
141 $path = self::normalizeWikiPath($path);
143 if (trim($path) === "") {
145 $path = WikiPath::getContextPath()->toAbsoluteId();
154 $this->absolutePath = $path;
155 $firstCharacter = substr($path, 0, 1);
157 $parts = preg_split('/' . WikiPath::NAMESPACE_SEPARATOR_DOUBLE_POINT . '/', $path);
220 $lastPosition = StringUtility::lastIndexOf($path, ".");
352 static function createMediaPathFromPath($path, $rev = null): WikiPath argument
354 return new WikiPath($path, WikiPath::MEDIA_DRIVE, $rev);
431 function toDokuWikiIdDriveContextual($path): string argument
436 $id = self::removeRootSepIfPresent($path);
487 $path = $pathAndDrive;
501 $path = substr($pathAndDrive, $locationGreaterThan + 1);
503 return new WikiPath(":$path", $drive, $rev);
520 * @param string $path
523 static function addRootSeparatorIfNotPresent(string &$path) argument
525 $firstCharacter = substr($path, 0, 1);
527 $path = WikiPath::NAMESPACE_SEPARATOR_DOUBLE_POINT . $path;
547 static function toValidAbsolutePath($path): string argument
549 $path = cleanID($path);
550 WikiPath::addRootSeparatorIfNotPresent($path);
551 return $path;
570 static function createWikiPath($path, $drive, string $rev = ''): WikiPath argument
572 return new WikiPath($path, $drive, $rev);
601 static function createFromPathObject(Path $path): WikiPath argument
603 if ($path instanceof WikiPath) {
604 return $path;
606 if (!($path instanceof LocalPath)) {
607 …throw new ExceptionBadArgument("The path ($path) is not a local path and cannot be converted to a …
614 $relativePath = $path->relativize($drivePath);
625 $relativePath = $path->relativize($drivePath);
632 if (FileSystems::isDirectory($path)) {
639 throw new ExceptionBadArgument("The local path ($path) is not inside a wiki path drive");
712 * @param string $path - path or id
718 static function createFromPath(string $path, string $drive, string $rev = null): WikiPath argument
720 return new WikiPath($path, $drive, $rev);
759 static function removeRootSepIfPresent($path): string argument
761 $id = $path;
1047 $path = implode(WikiPath::NAMESPACE_SEPARATOR_DOUBLE_POINT, $names);
1054 $path = "$sep$path$sep";
1055 return new WikiPath($path, $this->drive, $this->rev);
1085 $path = $this->absolutePath . WikiPath::NAMESPACE_SEPARATOR_DOUBLE_POINT . $name;
1087 $path = $this->absolutePath . $name;
1089 return new WikiPath($path, $this->getDrive());