Copy/import files from given path into the page’s files directory
Available since version 3.0.114.
Usage
// basic usage
$int = $pagefilesManager->importFiles(string $fromPath);
// usage with all arguments
$int = $pagefilesManager->importFiles(string $fromPath, bool $move = false);
Arguments
Name | Type(s) | Description |
---|---|---|
fromPath | string | Path to copy/import files from. |
move (optional) | bool | Move files into directory rather than copy? |
Return value
int
Number of files/directories copied.
PagefilesManager methods and properties
API reference based on ProcessWire core version 3.0.236