diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index 56c0d451651b15c0f59d6e80cf9303d5c8b15bcd..e653050c5b3ee8bc009b271626795740a8ff6c67 100644
--- a/apps/files_external/lib/google.php
+++ b/apps/files_external/lib/google.php
@@ -286,7 +286,7 @@ class Google extends \OC\Files\Storage\Common {
 				// Check if this is a Google Doc
 				if ($this->getMimeType($path) !== $file->getMimeType()) {
 					// Return unknown file size
-					$stat['size'] = \OC\Files\SPACE_UNKNOWN;
+					$stat['size'] = \OC\Files\Filesystem::SPACE_UNKNOWN;
 				} else {
 					$stat['size'] = $file->getFileSize();
 				}
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index 02fcd7041dd04f6787eac0a64b1a3c36b9edf566..4b9be4109e993948e7c3663e24cb8d83bd86e7d6 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -377,7 +377,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
 			list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($source);
 			return $storage->free_space($internalPath);
 		}
-		return \OC\Files\SPACE_UNKNOWN;
+		return \OC\Files\Filesystem::SPACE_UNKNOWN;
 	}
 
 	public function getLocalFile($path) {
diff --git a/lib/private/connector/sabre/quotaplugin.php b/lib/private/connector/sabre/quotaplugin.php
index cf3c1103f84ed9ae0a2975bd7bfe5f6118f932b3..a215a772c0323621e3b4aea4f3e0449b3b8d86fa 100644
--- a/lib/private/connector/sabre/quotaplugin.php
+++ b/lib/private/connector/sabre/quotaplugin.php
@@ -72,7 +72,7 @@ class OC_Connector_Sabre_QuotaPlugin extends \Sabre\DAV\ServerPlugin {
 				$length -= $chunkHandler->getCurrentSize();
 			}
 			$freeSpace = $this->getFreeSpace($parentUri);
-			if ($freeSpace !== \OC\Files\SPACE_UNKNOWN && $length > $freeSpace) {
+			if ($freeSpace !== \OC\Files\Filesystem::SPACE_UNKNOWN && $length > $freeSpace) {
 				if (isset($chunkHandler)) {
 					$chunkHandler->cleanup();
 				}
diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php
index 4774d25ad9ec7fb2f348a5a7cc8b3cf2edf9d0d4..24329754dc1d406ab9481b9190830943f1ff151c 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 0720b8180c968214cdc500ef436810649f3b0ce1..08c892cb7fef737809181e9a10f0e212a446372d 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 ce447417d20880fb67ec8c2f4a50f29a6c2fb068..93036b8ca44586ba77497a7a0ec8f70b549925db 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 a8b420e978a1d2042dbf8497583e87226a06d206..eeb7af5cd08f8dea4a8a4392509af6429e5f3f49 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 c57c797f87a57c5c1f2babc63e2b5e2e99bc8bb7..f9157ba84f4a824531438ed7aa37e6b7e088817a 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);
diff --git a/lib/private/helper.php b/lib/private/helper.php
index 79df2e3255c003a1b5ece616a691c6c3febf4e04..840869e58c4aa7c02732f013d14dc7939c5170e0 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -887,7 +887,7 @@ class OC_Helper {
 	 */
 	public static function freeSpace($dir) {
 		$freeSpace = \OC\Files\Filesystem::free_space($dir);
-		if ($freeSpace !== \OC\Files\SPACE_UNKNOWN) {
+		if ($freeSpace !== \OC\Files\Filesystem::SPACE_UNKNOWN) {
 			$freeSpace = max($freeSpace, 0);
 			return $freeSpace;
 		} else {
@@ -960,7 +960,7 @@ class OC_Helper {
 		}
 		if ($includeExtStorage) {
 			$quota = OC_Util::getUserQuota(\OCP\User::getUser());
-			if ($quota !== \OC\Files\SPACE_UNLIMITED) {
+			if ($quota !== \OC\Files\Filesystem::SPACE_UNLIMITED) {
 				// always get free space / total space from root + mount points
 				$path = '';
 				return self::getGlobalStorageInfo();
diff --git a/lib/private/util.php b/lib/private/util.php
index 4959cb5a786411896a506080b4c4a3f1e5e53cdd..28cc87bfddd383c913ff75232134a790c7773328 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -105,7 +105,7 @@ class OC_Util {
 					if (is_object($storage->getUser())) {
 						$user = $storage->getUser()->getUID();
 						$quota = OC_Util::getUserQuota($user);
-						if ($quota !== \OC\Files\SPACE_UNLIMITED) {
+						if ($quota !== \OC\Files\Filesystem::SPACE_UNLIMITED) {
 							return new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => $quota, 'root' => 'files'));
 						}
 					}
@@ -197,7 +197,7 @@ class OC_Util {
 			$userQuota = $config->getAppValue('files', 'default_quota', 'none');
 		}
 		if($userQuota === 'none') {
-			return \OC\Files\SPACE_UNLIMITED;
+			return \OC\Files\Filesystem::SPACE_UNLIMITED;
 		}else{
 			return OC_Helper::computerFileSize($userQuota);
 		}