aboutsummaryrefslogtreecommitdiffstats
path: root/lib/files/cache/cache.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-10-27 10:01:20 +0200
committerRobin Appelman <icewind@owncloud.com>2012-10-27 10:01:20 +0200
commit695405dfeb4da3733df1b1be239a97100f2ce66f (patch)
treeb1e4aefe0bb45ab9ba25171eb595da4ada2148d2 /lib/files/cache/cache.php
parent99534271977ef5a4fd35ce119d6627bbcde45096 (diff)
downloadnextcloud-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.php15
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;
+ }
}