Split getFolderContentById

This commit is contained in:
Robin Appelman 2014-02-21 15:35:12 +01:00
parent 3980a7d9c6
commit dd98e6333f
1 changed files with 10 additions and 0 deletions

View File

@ -169,6 +169,16 @@ class Cache {
if (is_null($fileId)) {
$fileId = $this->getId($folder);
}
return $this->getFolderContentsById($fileId);
}
/**
* get the metadata of all files stored in $folder
*
* @param int $fileId the file id of the folder
* @return array
*/
public function getFolderContentsById($fileId) {
if ($fileId > -1) {
$sql = 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`,
`storage_mtime`, `encrypted`, `unencrypted_size`, `etag`