FileUtils
class FileUtils (View source)
A collection of file utilities.
Methods
Return an array with the allowed file types.
Read a file's caption file and render contained markdown syntax.
Parse a file declaration string where multiple glob patterns or URLs can be separated by a comma and return an array with the resolved/downloaded file paths.
Parse a filename to check whether a file is an image or not.
Details
at line 54
static array
allowedFileTypes()
Return an array with the allowed file types.
at line 66
static string
caption(string $file)
Read a file's caption file and render contained markdown syntax.
The caption filename is build out of the actual filename with the appended ".caption" extension, like "image.jpg.caption".
at line 89
static array
fileDeclaration(string $str, Page $Page, bool $stripBaseDir = false)
Parse a file declaration string where multiple glob patterns or URLs can be separated by a comma and return an array with the resolved/downloaded file paths.
If $stripBaseDir is true, the base directory will be stripped from the path and each path gets resolved to be relative to the Automad installation directory.
at line 122
static bool
fileIsImage(string $file)
Parse a filename to check whether a file is an image or not.