class FileSystemPathFactory extends AbstractFileSystemPathFactory
A path factory that produces file system paths by inspecting the supplied string, and determining the most suitable path type to use.
Methods
__construct(PathFactoryInterface $unixFactory = null, PathFactoryInterface $windowsFactory = null, Isolator $isolator = null)
Construct a new file system path factory. |
from AbstractFileSystemPathFactory | |
PathFactoryInterface |
unixFactory()
Get the path factory used for Unix paths. |
from AbstractFileSystemPathFactory |
PathFactoryInterface |
windowsFactory()
Get the path factory used for Windows paths. |
from AbstractFileSystemPathFactory |
AbsoluteFileSystemPathInterface |
createWorkingDirectoryPath()
Create a path representing the current working directory. |
from AbstractFileSystemPathFactory |
AbsoluteFileSystemPathInterface |
createTemporaryDirectoryPath()
Create a path representing the system temporary directory. |
from AbstractFileSystemPathFactory |
AbsoluteFileSystemPathInterface |
createTemporaryPath(string|null $prefix = null)
Create a path representing a suitable for use as the location for a new temporary file or directory. |
from AbstractFileSystemPathFactory |
static FileSystemPathFactoryInterface |
instance()
Get a static instance of this path factory. |
|
PathInterface |
create(string $path)
Creates a new path instance from its string representation. |
|
PathInterface |
createFromAtoms(mixed<string> $atoms, boolean|null $isAbsolute = null, boolean|null $hasTrailingSeparator = null)
Creates a new path instance from a set of path atoms. |
Details
in AbstractFileSystemPathFactory at line 33
public
__construct(PathFactoryInterface $unixFactory = null, PathFactoryInterface $windowsFactory = null, Isolator $isolator = null)
Construct a new file system path factory.
in AbstractFileSystemPathFactory at line 55
public PathFactoryInterface
unixFactory()
Get the path factory used for Unix paths.
in AbstractFileSystemPathFactory at line 65
public PathFactoryInterface
windowsFactory()
Get the path factory used for Windows paths.
in AbstractFileSystemPathFactory at line 75
public AbsoluteFileSystemPathInterface
createWorkingDirectoryPath()
Create a path representing the current working directory.
in AbstractFileSystemPathFactory at line 86
public AbsoluteFileSystemPathInterface
createTemporaryDirectoryPath()
Create a path representing the system temporary directory.
in AbstractFileSystemPathFactory 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.
at line 29
static public FileSystemPathFactoryInterface
instance()
Get a static instance of this path factory.
at line 45
public PathInterface
create(string $path)
Creates a new path instance from its string representation.
at line 65
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.