summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-02-04 19:58:49 +0100
committerVincent Petry <pvince81@owncloud.com>2014-02-06 20:53:15 +0100
commit788c8540aa6aac50795c37b088eeaa561d44b86c (patch)
treee20e28f38477c4bf2d6412ee8a77f3eb806b5bff /lib/public
parentbe47e156a5afee8a20f60d278aab45bb84c282c2 (diff)
downloadnextcloud-server-788c8540aa6aac50795c37b088eeaa561d44b86c.tar.gz
nextcloud-server-788c8540aa6aac50795c37b088eeaa561d44b86c.zip
Added isLocal() method to storage, used for xsendfile
Added isLocal() method to Storage to find out whether the storage is local or not. This method is used for the x-sendfile logic to find out whether to add the headers.
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/files/storage.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/public/files/storage.php b/lib/public/files/storage.php
index 194b42a6481..fe30f8f50af 100644
--- a/lib/public/files/storage.php
+++ b/lib/public/files/storage.php
@@ -315,4 +315,15 @@ interface Storage {
* @return string
*/
public function getETag($path);
+
+ /**
+ * Returns whether the storage is local, which means that files
+ * are stored on the local filesystem instead of remotely.
+ * Calling getLocalFile() for local storages should always
+ * return the local files, whereas for non-local storages
+ * it might return a temporary file.
+ *
+ * @return bool true if the files are stored locally, false otherwise
+ */
+ public function isLocal();
}