summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-02-05 16:48:08 +0100
committerRobin Appelman <icewind@owncloud.com>2016-02-05 16:48:08 +0100
commitfb76d7de69e0f13f196a644cfded0a6e079e7200 (patch)
tree9bb6f9a93c76519493f6fce40a795c7f30eda917
parent7dde2c773f4efee0094176fe76b2c64f4f74a1ea (diff)
downloadnextcloud-server-fb76d7de69e0f13f196a644cfded0a6e079e7200.tar.gz
nextcloud-server-fb76d7de69e0f13f196a644cfded0a6e079e7200.zip
remove unused Storage->getLocalFolder
-rw-r--r--lib/private/files/storage/common.php6
-rw-r--r--lib/private/files/storage/wrapper/availability.php11
-rw-r--r--lib/private/files/storage/wrapper/jail.php11
-rw-r--r--lib/private/files/storage/wrapper/wrapper.php11
-rw-r--r--lib/public/files/storage.php9
-rw-r--r--lib/public/files/storage/istorage.php10
-rw-r--r--tests/lib/files/storage/home.php12
-rw-r--r--tests/lib/files/storage/storage.php3
8 files changed, 0 insertions, 73 deletions
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php
index 7d8d9ebd25e..3d5898dcd80 100644
--- a/lib/private/files/storage/common.php
+++ b/lib/private/files/storage/common.php
@@ -248,12 +248,6 @@ abstract class Common implements Storage, ILockingStorage {
return $this->getCachedFile($path);
}
- public function getLocalFolder($path) {
- $baseDir = \OC::$server->getTempManager()->getTemporaryFolder();
- $this->addLocalFolder($path, $baseDir);
- return $baseDir;
- }
-
/**
* @param string $path
* @param string $target
diff --git a/lib/private/files/storage/wrapper/availability.php b/lib/private/files/storage/wrapper/availability.php
index 1550c318ce3..55ddb0d5e8f 100644
--- a/lib/private/files/storage/wrapper/availability.php
+++ b/lib/private/files/storage/wrapper/availability.php
@@ -377,17 +377,6 @@ class Availability extends Wrapper {
}
/** {@inheritdoc} */
- public function getLocalFolder($path) {
- $this->checkAvailability();
- try {
- return parent::getLocalFolder($path);
- } catch (\OCP\Files\StorageNotAvailableException $e) {
- $this->setAvailability(false);
- throw $e;
- }
- }
-
- /** {@inheritdoc} */
public function hasUpdated($path, $time) {
$this->checkAvailability();
try {
diff --git a/lib/private/files/storage/wrapper/jail.php b/lib/private/files/storage/wrapper/jail.php
index 40738befd93..e5f5ab90359 100644
--- a/lib/private/files/storage/wrapper/jail.php
+++ b/lib/private/files/storage/wrapper/jail.php
@@ -353,17 +353,6 @@ class Jail extends Wrapper {
}
/**
- * get the path to a local version of the folder.
- * The local version of the folder can be temporary and doesn't have to be persistent across requests
- *
- * @param string $path
- * @return string
- */
- public function getLocalFolder($path) {
- return $this->storage->getLocalFolder($this->getSourcePath($path));
- }
-
- /**
* check if a file or folder has been updated since $time
*
* @param string $path
diff --git a/lib/private/files/storage/wrapper/wrapper.php b/lib/private/files/storage/wrapper/wrapper.php
index c632aa399e1..12914e7a1b8 100644
--- a/lib/private/files/storage/wrapper/wrapper.php
+++ b/lib/private/files/storage/wrapper/wrapper.php
@@ -354,17 +354,6 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage {
}
/**
- * get the path to a local version of the folder.
- * The local version of the folder can be temporary and doesn't have to be persistent across requests
- *
- * @param string $path
- * @return string
- */
- public function getLocalFolder($path) {
- return $this->storage->getLocalFolder($path);
- }
-
- /**
* check if a file or folder has been updated since $time
*
* @param string $path
diff --git a/lib/public/files/storage.php b/lib/public/files/storage.php
index 1c125221449..2511690b7d3 100644
--- a/lib/public/files/storage.php
+++ b/lib/public/files/storage.php
@@ -331,15 +331,6 @@ interface Storage extends IStorage {
public function getLocalFile($path);
/**
- * get the path to a local version of the folder.
- * The local version of the folder can be temporary and doesn't have to be persistent across requests
- *
- * @param string $path
- * @return string|false
- * @since 6.0.0
- */
- public function getLocalFolder($path);
- /**
* check if a file or folder has been updated since $time
*
* @param string $path
diff --git a/lib/public/files/storage/istorage.php b/lib/public/files/storage/istorage.php
index 4bc5e3536dc..278374f3297 100644
--- a/lib/public/files/storage/istorage.php
+++ b/lib/public/files/storage/istorage.php
@@ -334,16 +334,6 @@ interface IStorage {
public function getLocalFile($path);
/**
- * get the path to a local version of the folder.
- * The local version of the folder can be temporary and doesn't have to be persistent across requests
- *
- * @param string $path
- * @return string|false
- * @since 9.0.0
- */
- public function getLocalFolder($path);
-
- /**
* check if a file or folder has been updated since $time
*
* @param string $path
diff --git a/tests/lib/files/storage/home.php b/tests/lib/files/storage/home.php
index 7e10f09d554..1ed3b137cd4 100644
--- a/tests/lib/files/storage/home.php
+++ b/tests/lib/files/storage/home.php
@@ -82,18 +82,6 @@ class Home extends Storage {
}
/**
- * Tests that the root path matches the data dir
- */
- public function testRoot() {
- if (\OC_Util::runningOnWindows()) {
- // Windows removes trailing slashes when returning paths
- $this->assertEquals(rtrim($this->tmpDir, '/'), $this->instance->getLocalFolder(''));
- } else {
- $this->assertEquals($this->tmpDir, $this->instance->getLocalFolder(''));
- }
- }
-
- /**
* Tests that the home id is in the format home::user1
*/
public function testId() {
diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php
index 95dd70bfdac..42bd491df5c 100644
--- a/tests/lib/files/storage/storage.php
+++ b/tests/lib/files/storage/storage.php
@@ -262,9 +262,6 @@ abstract class Storage extends \Test\TestCase {
$this->instance->file_put_contents('/folder/bar.txt', 'asd');
$this->instance->mkdir('/folder/recursive');
$this->instance->file_put_contents('/folder/recursive/file.txt', 'foo');
- $localFolder = $this->instance->getLocalFolder('/folder');
-
- $this->assertTrue(is_dir($localFolder));
// test below require to use instance->getLocalFile because the physical storage might be different
$localFile = $this->instance->getLocalFile('/folder/lorem.txt');