diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-10-27 10:01:20 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-10-27 10:01:20 +0200 |
commit | 695405dfeb4da3733df1b1be239a97100f2ce66f (patch) | |
tree | b1e4aefe0bb45ab9ba25171eb595da4ada2148d2 /lib/files/cache/cache.php | |
parent | 99534271977ef5a4fd35ce119d6627bbcde45096 (diff) | |
download | nextcloud-server-695405dfeb4da3733df1b1be239a97100f2ce66f.tar.gz nextcloud-server-695405dfeb4da3733df1b1be239a97100f2ce66f.zip |
add permissions data to the results of the cache api
Diffstat (limited to 'lib/files/cache/cache.php')
-rw-r--r-- | lib/files/cache/cache.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php index 7e0c5cb21f9..5efc7d67c4a 100644 --- a/lib/files/cache/cache.php +++ b/lib/files/cache/cache.php @@ -286,4 +286,19 @@ class Cache { } return $files; } + + /** + * get all file ids on the files on the storage + * + * @return int[] + */ + public function getAll() { + $query = \OC_DB::prepare('SELECT `fileid` FROM `*PREFIX*filecache` WHERE `storage` = ?'); + $result = $query->execute(array($this->storageId)); + $ids = array(); + while ($row = $result->fetchRow()) { + $ids[] = $row['fileid']; + } + return $ids; + } } |