Contao\FilesModel::findMultipleFilesByFolder PHP Method

findMultipleFilesByFolder() public static method

Find all files in a folder
public static findMultipleFilesByFolder ( string $strPath, array $arrOptions = [] ) : Collection | FilesModel[] | FilesModel | null
$strPath string The folder path
$arrOptions array An optional options array
return Contao\Model\Collection | FilesModel[] | FilesModel | null A collection of models or null if there are no matching files
    public static function findMultipleFilesByFolder($strPath, array $arrOptions = array())
    {
        $t = static::$strTable;
        $strPath = str_replace(array('\\', '%', '_'), array('\\\\', '\\%', '\\_'), $strPath);
        return static::findBy(array("{$t}.type='file' AND {$t}.path LIKE ? AND {$t}.path NOT LIKE ?"), array($strPath . '/%', $strPath . '/%/%'), $arrOptions);
    }