interface RelativeWindowsPathInterface implements RelativeFileSystemPathInterface, WindowsPathInterface
The interface implemented by relative Windows paths.
Methods
string|null |
drive()
Get this path's drive specifier. |
from WindowsPathInterface |
boolean |
hasDrive()
Determine whether this path has a drive specifier. |
from WindowsPathInterface |
boolean |
matchesDrive(string|null $drive)
Returns true if this path's drive specifier matches the supplied drive specifier. |
from WindowsPathInterface |
boolean |
matchesDriveOrNull(string|null $drive)
Returns true if this path's drive specifier matches the supplied drive specifier, or if either drive specifier is null. |
from WindowsPathInterface |
string|null |
joinDrive($drive)
Joins the supplied drive specifier to this path. |
from WindowsPathInterface |
boolean |
isAnchored()
Returns true if this path is 'anchored' to the drive root. |
Details
in WindowsPathInterface at line 29
public string|null
drive()
Get this path's drive specifier.
Absolute Windows paths always have a drive specifier, and will never return null for this method.
in WindowsPathInterface at line 39
public boolean
hasDrive()
Determine whether this path has a drive specifier.
Absolute Windows paths always have a drive specifier, and will always return true for this method.
in WindowsPathInterface at line 51
public boolean
matchesDrive(string|null $drive)
Returns true if this path's drive specifier matches the supplied drive specifier.
This method is not case sensitive.
in WindowsPathInterface at line 63
public boolean
matchesDriveOrNull(string|null $drive)
Returns true if this path's drive specifier matches the supplied drive specifier, or if either drive specifier is null.
This method is not case sensitive.
in WindowsPathInterface at line 72
public string|null
joinDrive($drive)
Joins the supplied drive specifier to this path.
at line 35
public boolean
isAnchored()
Returns true if this path is 'anchored' to the drive root.
This is a special case to represent almost-absolute Windows paths where the drive is not present, but the path is still specified as starting from the root of the drive.
For example, the Windows path \path\to\foo
represents the path
C:\path\to\foo
when resolved against the C:
drive.