eloquent/pathogen API
Interface

Eloquent\Pathogen\Windows\RelativeWindowsPathInterface

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.

Return Value

string|null The drive specifier, or null if this path does not have a drive specifier.

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.

Return Value

boolean True is this path has a drive specifier.

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.

Parameters

string|null $drive The driver specifier to compare to.

Return Value

boolean True if the drive specifiers match.

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.

Parameters

string|null $drive The driver specifier to compare to.

Return Value

boolean True if the drive specifiers match, or either drive specifier is null.

in WindowsPathInterface at line 72
public string|null joinDrive($drive)

Joins the supplied drive specifier to this path.

Parameters

$drive

Return Value

string|null $drive The drive specifier to use, or null to remove the drive specifier.

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.

Return Value

boolean True if this path is anchored.