public function folderFiles($path, $filter = '.', $recurse = false, $full = false, $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'), $excludefilter = array('^\\..*', '.*~'), $naturalSort = false)
{
// JFolder throws idiotic errors if the path is not a folder
try {
$path = \JPath::clean($path);
} catch (\Exception $e) {
return array();
}
if (!@is_dir($path)) {
return array();
}
// Now call JFolder
return \JFolder::files($path, $filter, $recurse, $full, $exclude, $excludefilter, $naturalSort);
}