Lines Matching refs:drive

11  * A dokuwiki path has the same structure than a windows path with a drive and a path
13 * The drive being a local path on the local file system
23 * TODO: because all {@link LocalPath} has at minium a drive (ie C:,D:, E: for windows or \ for linux)
25 * The {@link LocalPath::toWikiPath()} should not throw then but as not all drive
26 * may be public, we need to add a drive functionality to get this information.
60 public const DRIVE_ATTRIBUTE = "drive";
98 private $drive;
120 * @param string $drive - the drive (media, page, combo) - same as in windows for the drive prefix (c, d, ...)
132 protected function __construct(string $path, string $drive, string $rev = null)
156 if ($drive === self::MARKUP_DRIVE && $firstCharacter !== WikiPath::NAMESPACE_SEPARATOR_DOUBLE_POINT) {
219 if ($drive === self::UNKNOWN_DRIVE) {
222 $drive = self::MARKUP_DRIVE;
224 $drive = self::MEDIA_DRIVE;
227 $this->drive = $drive;
238 $this->drive = self::COMBO_DRIVE;
251 * For a Markup drive path, a file path should have an extension
490 $drive = WikiPath::MARKUP_DRIVE;
494 $drive = WikiPath::MARKUP_DRIVE;
496 $drive = WikiPath::MEDIA_DRIVE;
500 $drive = substr($pathAndDrive, 0, $locationGreaterThan);
503 return new WikiPath(":$path", $drive, $rev);
565 * @param $drive - the drive
570 static function createWikiPath($path, $drive, string $rev = ''): WikiPath
572 return new WikiPath($path, $drive, $rev);
598 * @throws ExceptionBadArgument - if the path is not a local path or is not in a known drive
617 * The drive may be a symlink link
639 throw new ExceptionBadArgument("The local path ($path) is not inside a wiki path drive");
713 * @param string $drive
718 static function createFromPath(string $path, string $drive, string $rev = null): WikiPath
720 return new WikiPath($path, $drive, $rev);
822 $this->drive === self::MARKUP_DRIVE
960 if ($this->drive == self::MEDIA_DRIVE) {
1024 return new WikiPath($this->absolutePath, $this->drive, $this->rev);
1044 return new WikiPath(WikiPath::NAMESPACE_SEPARATOR_DOUBLE_POINT, $this->drive, $this->rev);
1055 return new WikiPath($path, $this->drive, $this->rev);
1065 if ($this->drive === self::MARKUP_DRIVE) {
1076 return $this->drive;
1098 $uri = "{$this->getScheme()}://$this->drive$driveSep$absolutePath";
1155 switch ($this->drive) {
1163 $localPath = WikiPath::getDriveRoots()[$this->drive];
1174 switch ($this->drive) {
1213 $baseDirectory = WikiPath::getDriveRoots()[$this->drive];
1217 throw new ExceptionCast("The drive ($this->drive) is unknown, the local file system path could not be found");