aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/external/storage.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-05-19 16:39:57 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-06-14 10:14:07 +0200
commit87b0021e5606888642b5798ba39b0525bf3f3e14 (patch)
tree2ccd1e719b7f83e6f70b015c370e41f5b0fd8ba4 /apps/files_sharing/lib/external/storage.php
parent30f5b2bd7cdb9dde211dd0d897f798190c8d3947 (diff)
downloadnextcloud-server-87b0021e5606888642b5798ba39b0525bf3f3e14.tar.gz
nextcloud-server-87b0021e5606888642b5798ba39b0525bf3f3e14.zip
Scan the entire remote share at once by requesting the full file tree from the remote server
Diffstat (limited to 'apps/files_sharing/lib/external/storage.php')
-rw-r--r--apps/files_sharing/lib/external/storage.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php
index 0e799a0e9e3..741e219eff7 100644
--- a/apps/files_sharing/lib/external/storage.php
+++ b/apps/files_sharing/lib/external/storage.php
@@ -28,6 +28,11 @@ class Storage extends \OC\Files\Storage\DAV implements ISharedStorage {
private $mountPoint;
/**
+ * @var string
+ */
+ private $token;
+
+ /**
* @var \OCA\Files_Sharing\External\Manager
*/
private $manager;
@@ -41,6 +46,7 @@ class Storage extends \OC\Files\Storage\DAV implements ISharedStorage {
$secure = $protocol === 'https';
$root .= '/public.php/webdav';
$this->mountPoint = $options['mountpoint'];
+ $this->token = $options['token'];
parent::__construct(array(
'secure' => $secure,
'host' => $host,
@@ -62,6 +68,14 @@ class Storage extends \OC\Files\Storage\DAV implements ISharedStorage {
return $this->mountPoint;
}
+ public function getToken() {
+ return $this->token;
+ }
+
+ public function getPassword() {
+ return $this->password;
+ }
+
/**
* @brief get id of the mount point
* @return string
@@ -77,6 +91,17 @@ class Storage extends \OC\Files\Storage\DAV implements ISharedStorage {
return $this->cache;
}
+ /**
+ * @param string $path
+ * @return \OCA\Files_Sharing\External\Scanner
+ */
+ public function getScanner($path = '') {
+ if (!isset($this->scanner)) {
+ $this->scanner = new Scanner($this);
+ }
+ return $this->scanner;
+ }
+
public function rename($path1, $path2) {
// if we renamed the mount point we need to adjust the mountpoint in the database
if (Filesystem::normalizePath($this->mountPoint) === Filesystem::normalizePath($path1)) {