API results for “files”
$files apivar
Helpers for working with files and directories.
files() function
Access tools for working on the file system ($files API variable as a function)
Pagefiles class
Pagefiles is a type of WireArray that contains Pagefile objects. It also acts as the value for multi-file fields in ProcessWire.
PagefilesManager class
Manages files and file directories for a page independent of a particular field.
WireHttp class
WireHttp enables you to send HTTP requests to URLs, download files, and more.
WireUpload class
Saves uploads of single or multiple files, saving them to the destination path.
FieldtypeFile class
Field that stores one or more files with optional description.
FieldtypeImage class
Field that stores one or more image files.
Files module
One or more file uploads (sortable)
ZIP file validator module
Validates ZIP files with various configurable rules.
files() apivar.method
Access the $files API variable as a function.
$classLoader->addExtension(string $ext) apivar.method
Add a recognized file extension for PHP files
statusFiles($key = '', $value = null) apivar.method
$log->deleteAll(bool $throw = false) apivar.method
Delete all log files
$log->pruneAll(int $days) apivar.method
Prune all log files to given number of days
$log->path() apivar.method
Return disk path to log files
$files->mkdir(string $path, $recursive = false, $chmod = null) apivar.method
Create a directory that is writable to ProcessWire and uses the defined $config chmod settings
$files->rmdir(string $path, bool $recursive = false, $options = []) apivar.method
Remove a directory and optionally everything within it (recursively)
$files->chmod(string $path, $recursive = false, $chmod = null) apivar.method
Change the read/write mode of a file or directory, consistent with ProcessWire's configuration settings
$files->copy(string $src, string $dst, $options = []) apivar.method
Copy all files recursively from one directory ($src) to another directory ($dst)
$files->unlink(string $filename, $limitPath = false, bool $throw = false) apivar.method
Unlink/delete file with additional protections relative to PHP unlink()
$files->rename(string $oldName, string $newName, $options = []) apivar.method
Rename a file or directory and update permissions
$files->renameCopy(string $oldName, string $newName, array $options = []) apivar.method
Rename by first copying files to destination and then deleting source files
$files->exists(string $filename, $options = '') apivar.method
Does the given file/link/dir exist?
$files->size(string $path, $options = []) apivar.method
Get size of file or directory (in bytes)