/** * @param Folder $folder * @param bool $useFilters * @param bool $recursive * @return int Number of files in folder * @throws Exception\InsufficientFolderAccessPermissionsException */ public function countFilesInFolder(Folder $folder, $useFilters = true, $recursive = false) { $this->assureFolderReadPermission($folder); $filters = $useFilters ? $this->fileAndFolderNameFilters : array(); return $this->driver->countFilesInFolder($folder->getIdentifier(), $recursive, $filters); }