eloquent/pathogen API
Class

Eloquent\Pathogen\FileSystem\Factory\AbstractFileSystemPathFactory

abstract class AbstractFileSystemPathFactory implements FileSystemPathFactoryInterface

Abstract base class for classes implementing FileSystemPathFactoryInterface.

Methods

__construct(PathFactoryInterface $unixFactory = null, PathFactoryInterface $windowsFactory = null, Isolator $isolator = null)

Construct a new file system path factory.

PathFactoryInterface unixFactory()

Get the path factory used for Unix paths.

PathFactoryInterface windowsFactory()

Get the path factory used for Windows paths.

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

at line 33
public __construct(PathFactoryInterface $unixFactory = null, PathFactoryInterface $windowsFactory = null, Isolator $isolator = null)

Construct a new file system path factory.

Parameters

PathFactoryInterface $unixFactory The path factory to use for Unix paths.
PathFactoryInterface $windowsFactory The path factory to use for Windows paths.
Isolator $isolator The isolator to use.

at line 55
public PathFactoryInterface unixFactory()

Get the path factory used for Unix paths.

Return Value

PathFactoryInterface The path factory used for Unix paths.

at line 65
public PathFactoryInterface windowsFactory()

Get the path factory used for Windows paths.

Return Value

PathFactoryInterface The path factory used for Windows paths.

at line 75
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 86
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 103
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.