FilesystemUtils
in package
Filesystem utilities.
Tags
Table of Contents
- createTemporaryFile() : string
- Creates a temporary file.
- createThrowAwayDirectory() : string
- Creates a throw-away directory.
- getTemporaryDirectory() : mixed
- removeDirectory() : mixed
- Recursively removes a directory from the filesystem.
Methods
createTemporaryFile()
Creates a temporary file.
public
static createTemporaryFile(string $prefix) : string
Parameters
- $prefix : string
-
A prefix for the file name
Return values
string —The file path
createThrowAwayDirectory()
Creates a throw-away directory.
public
static createThrowAwayDirectory(string $prefix) : string
This is not considered a "temporary" directory because it will not be automatically deleted at the end of the request or process. It must be deleted manually.
Parameters
- $prefix : string
-
A prefix for the directory name
Return values
string —The directory path
getTemporaryDirectory()
public
static getTemporaryDirectory() : mixed
Return values
mixed —removeDirectory()
Recursively removes a directory from the filesystem.
public
static removeDirectory(mixed $directory) : mixed
Parameters
- $directory : mixed