Path
Read onlyYes
FinalYes
Methods
- __construct() : mixed
- addPartitions() : self
- basename() : string
- basenamePrefix() : self
- context() : ResourceContext
- endsWith() : bool
- extension() : string|false
- filename() : string
- from() : self
- getOption() : string|int|bool|float|UnitEnum|null
- hasOption() : bool
- isEqual() : bool
- isLocal() : bool
- isPattern() : bool
- matches() : bool
- options() : array<string, null|bool|float|int|string|UnitEnum>
- parentDirectory() : self
- partitions() : Partitions
- partitionsPaths() : array<string|int, Path>
- path() : string
- Difference between Path::uri and Path::path is that Path::uri returns path with scheme and Path::path returns path without scheme.
- protocol() : Protocol
- randomize() : self
- realpath() : self
- Turn relative path into absolute paths even when path does not exists or it's glob pattern.
- rootDirectoryName() : string|null
- setExtension() : self
- setOption() : self
- setOptionWhenEmpty() : self
- skipDirectories() : self|null
- staticPart() : self
- suffix() : self
- uri() : string
- Difference between Path::uri and Path::path is that Path::uri returns path with scheme and Path::path returns path without scheme.
Methods
__construct()
public
__construct(WindowsPath|UnixPath $implementation) : mixed
Parameters
- $implementation : WindowsPath|UnixPath
addPartitions()
public
addPartitions(Partition $partition, Partition ...$partitions) : self
Parameters
Return values
selfbasename()
public
basename() : string
Return values
stringbasenamePrefix()
public
basenamePrefix(string $prefix) : self
Parameters
- $prefix : string
Return values
selfcontext()
public
context() : ResourceContext
Return values
ResourceContextendsWith()
public
endsWith(string $string) : bool
Parameters
- $string : string
Return values
boolextension()
public
extension() : string|false
Return values
string|falsefilename()
public
filename() : string
Return values
stringfrom()
public
static from(string $uri[, array<string|int, null|bool|float|int|string|UnitEnum>|Options $options = [] ]) : self
Parameters
- $uri : string
- $options : array<string|int, null|bool|float|int|string|UnitEnum>|Options = []
Return values
selfgetOption()
public
getOption(string|Option $option[, string|int|bool|float|UnitEnum|null $default = null ]) : string|int|bool|float|UnitEnum|null
Parameters
- $option : string|Option
- $default : string|int|bool|float|UnitEnum|null = null
Return values
string|int|bool|float|UnitEnum|nullhasOption()
public
hasOption(string|Option $option) : bool
Parameters
- $option : string|Option
Return values
boolisEqual()
public
isEqual(self $path) : bool
Parameters
- $path : self
Return values
boolisLocal()
public
isLocal() : bool
Return values
boolisPattern()
public
isPattern() : bool
Return values
boolmatches()
public
matches(self $path) : bool
Parameters
- $path : self
Return values
booloptions()
public
options() : array<string, null|bool|float|int|string|UnitEnum>
Return values
array<string, null|bool|float|int|string|UnitEnum>parentDirectory()
public
parentDirectory() : self
Return values
selfpartitions()
public
partitions() : Partitions
Return values
PartitionspartitionsPaths()
public
partitionsPaths() : array<string|int, Path>
Return values
array<string|int, Path>path()
Difference between Path::uri and Path::path is that Path::uri returns path with scheme and Path::path returns path without scheme.
public
path() : string
Return values
stringprotocol()
public
protocol() : Protocol
Return values
Protocolrandomize()
public
randomize() : self
Return values
selfrealpath()
Turn relative path into absolute paths even when path does not exists or it's glob pattern.
public
static realpath(string $path[, array<string, null|bool|float|int|string|UnitEnum>|Options $options = [] ]) : self
Parameters
- $path : string
- $options : array<string, null|bool|float|int|string|UnitEnum>|Options = []
Tags
Return values
selfrootDirectoryName()
public
rootDirectoryName() : string|null
Return values
string|nullsetExtension()
public
setExtension(string $extension) : self
Parameters
- $extension : string
Return values
selfsetOption()
public
setOption(string|Option $option, string|int|bool|float|UnitEnum|null $value) : self
Parameters
- $option : string|Option
- $value : string|int|bool|float|UnitEnum|null
Return values
selfsetOptionWhenEmpty()
public
setOptionWhenEmpty(string|Option $option, string|int|bool|float|UnitEnum|null $value) : self
Parameters
- $option : string|Option
- $value : string|int|bool|float|UnitEnum|null
Return values
selfskipDirectories()
public
skipDirectories(int $count) : self|null
Parameters
- $count : int
Return values
self|nullstaticPart()
public
staticPart() : self
Return values
selfsuffix()
public
suffix(string $string) : self
Parameters
- $string : string
Return values
selfuri()
Difference between Path::uri and Path::path is that Path::uri returns path with scheme and Path::path returns path without scheme.
public
uri() : string