eloquent/pathogen API
Interface

Eloquent\Pathogen\FileSystem\Factory\FileSystemPathFactoryInterface

interface FileSystemPathFactoryInterface implements PathFactoryInterface

The interface implemented by path factories that deal with file system paths.

Methods

PathInterface create(string $path)

Creates a new path instance from its string representation.

from PathFactoryInterface
PathInterface createFromAtoms(mixed<string> $atoms, boolean|null $isAbsolute = null, boolean|null $hasTrailingSeparator = null)

Creates a new path instance from a set of path atoms.

from PathFactoryInterface
AbsoluteFileSystemPathInterface createWorkingDirectoryPath()

Create a path representing the current working directory.

AbsoluteFileSystemPathInterface createTemporaryDirectoryPath()

Create a path representing the system temporary directory.

AbsoluteFileSystemPathInterface createTemporaryPath(string|null $prefix = null)

Create a path representing a suitable for use as the location for a new temporary file or directory.

Details

in PathFactoryInterface at line 30
public PathInterface create(string $path)

Creates a new path instance from its string representation.

Parameters

string $path The string representation of the path.

Return Value

PathInterface The newly created path instance.

in PathFactoryInterface at line 43
public PathInterface createFromAtoms(mixed<string> $atoms, boolean|null $isAbsolute = null, boolean|null $hasTrailingSeparator = null)

Creates a new path instance from a set of path atoms.

Parameters

mixed<string> $atoms The path atoms.
boolean|null $isAbsolute True if the path is absolute.
boolean|null $hasTrailingSeparator True if the path has a trailing separator.

Return Value

PathInterface The newly created path instance.

Exceptions

InvalidPathAtomExceptionInterface If any of the supplied atoms are invalid.
InvalidPathStateException If the supplied arguments would produce an invalid path.

at line 27
public AbsoluteFileSystemPathInterface createWorkingDirectoryPath()

Create a path representing the current working directory.

Return Value

AbsoluteFileSystemPathInterface A new path instance representing the current working directory path.

at line 34
public AbsoluteFileSystemPathInterface createTemporaryDirectoryPath()

Create a path representing the system temporary directory.

Return Value

AbsoluteFileSystemPathInterface A new path instance representing the system default temporary directory path.

at line 47
public AbsoluteFileSystemPathInterface createTemporaryPath(string|null $prefix = null)

Create a path representing a suitable for use as the location for a new temporary file or directory.

This path is not guaranteed to be unused, but collisions are fairly unlikely.

Parameters

string|null $prefix A string to use as a prefix for the path name.

Return Value

AbsoluteFileSystemPathInterface A new path instance representing the new temporary path.