class RelativeUnixPath extends RelativePath implements RelativeFileSystemPathInterface, RelativeUnixPathInterface
Represents a relative 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 RelativePathInterface |
fromString(string $path)
Creates a new relative path instance from its string representation. |
from RelativePath |
static RelativePathInterface |
fromAtoms(mixed<string> $atoms, boolean|null $hasTrailingSeparator = null)
Creates a new relative path from a set of path atoms. |
from RelativePath |
AbsolutePathInterface |
toAbsolute()
Get an absolute version of this path. |
from RelativePath |
RelativePathInterface |
toRelative()
Get a relative version of this path. |
from RelativePath |
boolean |
isSelf()
Determine whether this path is the self path. |
from RelativePath |
AbsolutePathInterface |
resolveAgainst(AbsolutePathInterface $basePath)
Resolve this path against the supplied path. |
from RelativePath |
Details
in RelativePath at line 27
static public RelativePathInterface
fromString(string $path)
Creates a new relative path instance from its string representation.
in RelativePath at line 47
static public RelativePathInterface
fromAtoms(mixed<string> $atoms, boolean|null $hasTrailingSeparator = null)
Creates a new relative path from a set of path atoms.
in RelativePath at line 67
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 RelativePath at line 85
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 RelativePath at line 100
public boolean
isSelf()
Determine whether this path is the self path.
The self path is a relative path with a single self atom (i.e. a dot '.').
in RelativePath at line 114
public AbsolutePathInterface
resolveAgainst(AbsolutePathInterface $basePath)
Resolve this path against the supplied path.