Manages files and file directories for a page independent of a particular field.
Files in ProcessWire are always connected with a particular
Field on a
Page. This is typically
FieldtypeFile field or a
FieldtypeImage field, which exist as
values on the Page. Sometimes it is necessary to manage all files connected with a page as a
group, and this files manager class provides that. Likewise, something needs to manage the paths
and URLs where these files live, and that is where this files manager comes into play as well.
Summary of what Pagefiles
- Provides methods for movement of all files connected with a page as a group.
- Ensures that file directories for a page are created (and removed) when applicable.
- Manages secured vs. normal page file paths (see
- Manages extended vs. normal page file paths (see
How to access the Page files manager
The Page files manager can be accessed from any page’s
Page::filesManager() method or property.
// Example of getting a Page’s dedicated file path and URL $filesPath = $page->filesManager->path(); $filesURL = $page->filesManager->url();
Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the
Pagefiles class also inherits all the methods and properties of: Wire.
Additional methods and properties
In addition to the methods and properties above, Pagefiles
API reference based on ProcessWire core version 3.0.135