$page->hasFiles() method

Does the page have a files path and one or more files present in it?

This will only check if files exist, it will not create the directory if it’s not already present.

Available since version 3.0.138. Earlier versions must use the more verbose PagefilesManager::hasFiles($page)

Usage

$bool = $page->hasFiles();

Return value

bool


$page methods and properties

API reference based on ProcessWire core version 3.0.244

“Yesterday I sent the client a short documentation for their ProcessWire-powered website. Today all features already used with no questions. #cmsdoneright—Marc Hinse, Web designer/developer