summaryrefslogtreecommitdiffstats
path: root/lib/private/files
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/files')
-rw-r--r--lib/private/files/filesystem.php7
-rw-r--r--lib/private/files/storage/common.php2
-rw-r--r--lib/private/files/storage/dav.php4
-rw-r--r--lib/private/files/storage/local.php2
-rw-r--r--lib/private/files/storage/wrapper/quota.php4
5 files changed, 10 insertions, 9 deletions
diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php
index 4774d25ad9e..24329754dc1 100644
--- a/lib/private/files/filesystem.php
+++ b/lib/private/files/filesystem.php
@@ -31,11 +31,12 @@
namespace OC\Files;
use OC\Files\Storage\Loader;
-const SPACE_NOT_COMPUTED = -1;
-const SPACE_UNKNOWN = -2;
-const SPACE_UNLIMITED = -3;
class Filesystem {
+ const SPACE_NOT_COMPUTED = -1;
+ const SPACE_UNKNOWN = -2;
+ const SPACE_UNLIMITED = -3;
+
/**
* @var Mount\Manager $mounts
*/
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php
index 0720b8180c9..08c892cb7fe 100644
--- a/lib/private/files/storage/common.php
+++ b/lib/private/files/storage/common.php
@@ -398,7 +398,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
* @return int
*/
public function free_space($path) {
- return \OC\Files\SPACE_UNKNOWN;
+ return \OC\Files\Filesystem::SPACE_UNKNOWN;
}
/**
diff --git a/lib/private/files/storage/dav.php b/lib/private/files/storage/dav.php
index ce447417d20..93036b8ca44 100644
--- a/lib/private/files/storage/dav.php
+++ b/lib/private/files/storage/dav.php
@@ -243,10 +243,10 @@ class DAV extends \OC\Files\Storage\Common {
if (isset($response['{DAV:}quota-available-bytes'])) {
return (int)$response['{DAV:}quota-available-bytes'];
} else {
- return \OC\Files\SPACE_UNKNOWN;
+ return \OC\Files\Filesystem::SPACE_UNKNOWN;
}
} catch (\Exception $e) {
- return \OC\Files\SPACE_UNKNOWN;
+ return \OC\Files\Filesystem::SPACE_UNKNOWN;
}
}
diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php
index a8b420e978a..eeb7af5cd08 100644
--- a/lib/private/files/storage/local.php
+++ b/lib/private/files/storage/local.php
@@ -218,7 +218,7 @@ if (\OC_Util::runningOnWindows()) {
public function free_space($path) {
$space = @disk_free_space($this->datadir . $path);
if ($space === false || is_null($space)) {
- return \OC\Files\SPACE_UNKNOWN;
+ return \OC\Files\Filesystem::SPACE_UNKNOWN;
}
return $space;
}
diff --git a/lib/private/files/storage/wrapper/quota.php b/lib/private/files/storage/wrapper/quota.php
index c57c797f87a..f9157ba84f4 100644
--- a/lib/private/files/storage/wrapper/quota.php
+++ b/lib/private/files/storage/wrapper/quota.php
@@ -50,7 +50,7 @@ class Quota extends Wrapper {
}
return $data['size'];
} else {
- return \OC\Files\SPACE_NOT_COMPUTED;
+ return \OC\Files\Filesystem::SPACE_NOT_COMPUTED;
}
}
@@ -66,7 +66,7 @@ class Quota extends Wrapper {
} else {
$used = $this->getSize($this->sizeRoot);
if ($used < 0) {
- return \OC\Files\SPACE_NOT_COMPUTED;
+ return \OC\Files\Filesystem::SPACE_NOT_COMPUTED;
} else {
$free = $this->storage->free_space($path);
$quotaFree = max($this->quota - $used, 0);