class AbsoluteUnixPath extends AbsolutePath implements AbsoluteFileSystemPathInterface, AbsoluteUnixPathInterface
Represents an absolute Unix path.
Constants
ATOM_SEPARATOR |
The character used to separate path atoms.
|
EXTENSION_SEPARATOR |
The character used to separate path name atoms.
|
PARENT_ATOM |
The atom used to represent 'parent'.
|
SELF_ATOM |
The atom used to represent 'self'.
|
Methods
static AbsolutePathInterface |
fromString(string $path)
Creates a new absolute path from its string representation. |
from AbsolutePath |
static AbsolutePathInterface |
fromAtoms(mixed<string> $atoms, boolean|null $hasTrailingSeparator = null)
Creates a new absolute path from a set of path atoms. |
from AbsolutePath |
string |
string()
Generate a string representation of this path. |
from AbsolutePath |
PathInterface |
joinTrailingSlash()
Adds a trailing slash to this path. |
from AbsolutePath |
AbsolutePathInterface |
toAbsolute()
Get an absolute version of this path. |
from AbsolutePath |
RelativePathInterface |
toRelative()
Get a relative version of this path. |
from AbsolutePath |
boolean |
isRoot()
Determine whether this path is the root path. |
from AbsolutePath |
boolean |
isParentOf(AbsolutePathInterface $path)
Determine if this path is the direct parent of the supplied path. |
from AbsolutePath |
boolean |
isAncestorOf(AbsolutePathInterface $path)
Determine if this path is an ancestor of the supplied path. |
from AbsolutePath |
RelativePathInterface |
relativeTo(AbsolutePathInterface $path)
Determine the shortest path from the supplied path to this path. |
from AbsolutePath |
AbsolutePathInterface |
resolve(PathInterface $path)
Resolve the supplied path against this path. |
from AbsolutePath |
Details
in AbsolutePath at line 27
static public AbsolutePathInterface
fromString(string $path)
Creates a new absolute path from its string representation.
in AbsolutePath at line 47
static public AbsolutePathInterface
fromAtoms(mixed<string> $atoms, boolean|null $hasTrailingSeparator = null)
Creates a new absolute path from a set of path atoms.
in AbsolutePath at line 63
public string
string()
Generate a string representation of this path.
in AbsolutePath at line 73
public PathInterface
joinTrailingSlash()
Adds a trailing slash to this path.
in AbsolutePath at line 91
public AbsolutePathInterface
toAbsolute()
Get an absolute version of this path.
If this path is relative, a new absolute path with equivalent atoms will be returned. Otherwise, this path will be retured unaltered.
in AbsolutePath at line 105
public RelativePathInterface
toRelative()
Get a relative version of this path.
If this path is absolute, a new relative path with equivalent atoms will be returned. Otherwise, this path will be retured unaltered.
in AbsolutePath at line 123
public boolean
isRoot()
Determine whether this path is the root path.
The root path is an absolute path with no atoms.
in AbsolutePath at line 135
public boolean
isParentOf(AbsolutePathInterface $path)
Determine if this path is the direct parent of the supplied path.
in AbsolutePath at line 149
public boolean
isAncestorOf(AbsolutePathInterface $path)
Determine if this path is an ancestor of the supplied path.
in AbsolutePath at line 170
public RelativePathInterface
relativeTo(AbsolutePathInterface $path)
Determine the shortest path from the supplied path to this path.
For example, given path A equal to '/foo/bar', and path B equal to '/foo/baz', A relative to B would be '../bar'.
in AbsolutePath at line 207
public AbsolutePathInterface
resolve(PathInterface $path)
Resolve the supplied path against this path.