Storage
class Storage (View source)
Methods
Get the path to a file or directory from the application's storage directory
Create the directory in storage recursively if it does not exist.
Create temporary file and return path.
Details
static string
path(string $path)
Get the path to a file or directory from the application's storage directory
static bool
mkdir(string $path, int|null $permissions = null)
Create the directory in storage recursively if it does not exist.
Note: If the permission is not defined, the permission of the system/storage directory will be used.
static bool
modified(string $path, DateTime $datetime)
Set the modified time of a file located in the storage directory, preserving the access time.
static bool
access(string $path, DateTime $datetime)
Set the access time of a file located in the storage directory, preserving the modification time.
static string
temp($prefix = '~')
Create temporary file and return path.
static int
clear($path, DateTime $expiresAt, int $attempts = 100, callable $filter = null)
Clear contents of storage application directory after specified expires date (or UNIX time), and returns number of deleted files