public static findMultipleFilesByFolder ( string $strPath, array $arrOptions = [] ) : |
||
$strPath | string | The folder path |
$arrOptions | array | An optional options array |
리턴 | 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);
}