diff --git a/apps/files/ajax/list.php b/apps/files/ajax/list.php
index 568fe754c0239139c90afa7046ee83180abccad5..92091f421353d370b47594059563b72dd3325065 100644
--- a/apps/files/ajax/list.php
+++ b/apps/files/ajax/list.php
@@ -32,7 +32,7 @@ if($doBreadcrumb) {
 
 // make filelist
 $files = array();
-foreach( OC_Files::getdirectorycontent( $dir ) as $i ) {
+foreach( \OC\Files\Filesystem::getDirectoryContent( $dir ) as $i ) {
 	$i["date"] = OCP\Util::formatDate($i["mtime"] );
 	$files[] = $i;
 }
diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php
index 5f3f3d88f27128ec6ac4ccc85a3c61d5270ec867..38714f34a639fa5bc8a9aa4a00c69833b23e20ad 100644
--- a/apps/files/ajax/newfile.php
+++ b/apps/files/ajax/newfile.php
@@ -65,9 +65,9 @@ if($source) {
 	$target=$dir.'/'.$filename;
 	$result=\OC\Files\Filesystem::file_put_contents($target, $sourceStream);
 	if($result) {
-		$meta = OC_FileCache::get($target);
+		$meta = \OC\Files\Filesystem::getFileInfo($target);
 		$mime=$meta['mimetype'];
-		$id = OC_FileCache::getId($target);
+		$id = $meta['fileid'];
 		$eventSource->send('success', array('mime'=>$mime, 'size'=>\OC\Files\Filesystem::filesize($target), 'id' => $id));
 	} else {
 		$eventSource->send('error', "Error while downloading ".$source. ' to '.$target);
@@ -77,14 +77,14 @@ if($source) {
 } else {
 	if($content) {
 		if(\OC\Files\Filesystem::file_put_contents($dir.'/'.$filename, $content)) {
-			$meta = OC_FileCache::get($dir.'/'.$filename);
-			$id = OC_FileCache::getId($dir.'/'.$filename);
+			$meta = \OC\Files\Filesystem::getFileInfo($dir.'/'.$filename);
+			$id = $meta['fileid'];
 			OCP\JSON::success(array("data" => array('content'=>$content, 'id' => $id)));
 			exit();
 		}
 	}elseif(\OC\Files\Filesystem::touch($dir . '/' . $filename)) {
-		$meta = OC_FileCache::get($dir.'/'.$filename);
-		$id = OC_FileCache::getId($dir.'/'.$filename);
+		$meta = \OC\Files\Filesystem::getFileInfo($dir.'/'.$filename);
+		$id = $meta['fileid'];
 		OCP\JSON::success(array("data" => array('content'=>$content, 'id' => $id)));
 		exit();
 	}
diff --git a/apps/files/ajax/newfolder.php b/apps/files/ajax/newfolder.php
index c36c208455116c003783e3febe8c98a32244032c..e26e1238bc60dfac8c850b992cee0d2cf8953217 100644
--- a/apps/files/ajax/newfolder.php
+++ b/apps/files/ajax/newfolder.php
@@ -25,7 +25,8 @@ if(\OC\Files\Filesystem::mkdir($dir . '/' . stripslashes($foldername))) {
 	} else {
 		$path = '/'.$foldername;
 	}
-	$id = OC_FileCache::getId($path);
+	$meta = \OC\Files\Filesystem::getFileInfo($path);
+	$id = $meta['fileid'];
 	OCP\JSON::success(array("data" => array('id'=>$id)));
 	exit();
 }
diff --git a/apps/files/ajax/rawlist.php b/apps/files/ajax/rawlist.php
index e0aa0bdac52014c444feb2f645dc9124fa795098..1cd2944483cb337e547296224881252ebd4fc9d2 100644
--- a/apps/files/ajax/rawlist.php
+++ b/apps/files/ajax/rawlist.php
@@ -15,7 +15,7 @@ $mimetype = isset($_GET['mimetype']) ? $_GET['mimetype'] : '';
 
 // make filelist
 $files = array();
-foreach( OC_Files::getdirectorycontent( $dir, $mimetype ) as $i ) {
+foreach( \OC\Files\Filesystem::getDirectoryContent( $dir, $mimetype ) as $i ) {
 	$i["date"] = OCP\Util::formatDate($i["mtime"] );
 	$i['mimetype_icon'] = $i['type'] == 'dir' ? \mimetype_icon('dir'): \mimetype_icon($i['mimetype']);
 	$files[] = $i;
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php
index b6b8c7f7b46686ba0e85208d7d50806a78b72788..2a784d61691c4db8a21760652bef75d8a558d14f 100644
--- a/apps/files/ajax/upload.php
+++ b/apps/files/ajax/upload.php
@@ -49,7 +49,7 @@ if(strpos($dir, '..') === false) {
 	for($i=0;$i<$fileCount;$i++) {
         $target = OCP\Files::buildNotExistingFileName(stripslashes($dir), $files['name'][$i]);
 		if(is_uploaded_file($files['tmp_name'][$i]) and \OC\Files\Filesystem::fromTmpFile($files['tmp_name'][$i], $target)) {
-			$meta = \OC_Files::getFileInfo($target);
+			$meta = \OC\Files\Filesystem::getFileInfo($target);
 			$id = $meta['fileid'];
 			$result[]=array( "status" => "success", 'mime'=>$meta['mimetype'],'size'=>$meta['size'], 'id'=>$id, 'name'=>basename($target));
 		}
diff --git a/apps/files/index.php b/apps/files/index.php
index 192cd2696f27ca49c6153da93224d0e4cbeb3334..4676ebc602132d66372cf9412f25ee05907826d9 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -44,7 +44,7 @@ if(!\OC\Files\Filesystem::is_dir($dir.'/')) {
 }
 
 $files = array();
-foreach( OC_Files::getdirectorycontent( $dir ) as $i ) {
+foreach( \OC\Files\Filesystem::getDirectoryContent( $dir ) as $i ) {
 	$i['date'] = OCP\Util::formatDate($i['mtime'] );
 	if($i['type']=='file') {
 		$fileinfo=pathinfo($i['name']);
diff --git a/apps/files/settings.php b/apps/files/settings.php
index 52ec9fd0fe3024c8119ec5cc39bfc8da2b682c41..30463210f719e2797d2ed843b435c88fc86e2e91 100644
--- a/apps/files/settings.php
+++ b/apps/files/settings.php
@@ -36,7 +36,7 @@ OCP\Util::addscript( "files", "files" );
 $dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
 
 $files = array();
-foreach( OC_Files::getdirectorycontent( $dir ) as $i ) {
+foreach( \OC\Files\Filesystem::getDirectoryContent( $dir ) as $i ) {
 	$i["date"] = date( $CONFIG_DATEFORMAT, $i["mtime"] );
 	$files[] = $i;
 }
diff --git a/apps/files_encryption/lib/cryptstream.php b/apps/files_encryption/lib/cryptstream.php
index e98013e1f42983ce81f202a271935ca6ab9cfecc..c429838264684c39c787cb845cc6c0dca8f0c897 100644
--- a/apps/files_encryption/lib/cryptstream.php
+++ b/apps/files_encryption/lib/cryptstream.php
@@ -167,7 +167,7 @@ class OC_CryptStream{
 	public function stream_close() {
 		$this->flush();
 		if($this->meta['mode']!='r' and $this->meta['mode']!='rb') {
-			OC_FileCache::put($this->path, array('encrypted'=>true,'size'=>$this->size),'');
+			\OC\Files\Filesystem::putFileInfo($this->path, array('encrypted'=>true,'size'=>$this->size),'');
 		}
 		return fclose($this->source);
 	}
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index 7b7bafe73eb4650049454093feea4648464651ec..49fb30ac291e6b0ea9ff5783258965b438538c13 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -59,7 +59,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{
 	 * @return bool
 	 */
 	private static function isEncrypted($path) {
-		$metadata=OC_FileCache_Cached::get($path,'');
+		$metadata=\OC\Files\Filesystem::getFileInfo($path,'');
 		return isset($metadata['encrypted']) and (bool)$metadata['encrypted'];
 	}
 
@@ -68,14 +68,14 @@ class OC_FileProxy_Encryption extends OC_FileProxy{
 			if (!is_resource($data)) {//stream put contents should have been converter to fopen
 				$size=strlen($data);
 				$data=OC_Crypt::blockEncrypt($data);
-				OC_FileCache::put($path, array('encrypted'=>true,'size'=>$size),'');
+				\OC\Files\Filesystem::putFileInfo($path, array('encrypted'=>true,'size'=>$size),'');
 			}
 		}
 	}
 
 	public function postFile_get_contents($path,$data) {
 		if(self::isEncrypted($path)) {
-			$cached=OC_FileCache_Cached::get($path,'');
+			$cached=\OC\Files\Filesystem::getFileInfo($path,'');
 			$data=OC_Crypt::blockDecrypt($data,'',$cached['size']);
 		}
 		return $data;
@@ -113,7 +113,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{
 
 	public function postStat($path,$data) {
 		if(self::isEncrypted($path)) {
-			$cached=OC_FileCache_Cached::get($path,'');
+			$cached=\OC\Files\Filesystem::getFileInfo($path,'');
 			$data['size']=$cached['size'];
 		}
 		return $data;
@@ -121,7 +121,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{
 
 	public function postFileSize($path,$size) {
 		if(self::isEncrypted($path)) {
-			$cached=OC_FileCache_Cached::get($path,'');
+			$cached=\OC\Files\Filesystem::getFileInfo($path,'');
 			return  $cached['size'];
 		}else{
 			return $size;
diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php
index e75c538b1502a5d1196d60e62b36084e3707956b..51048bd178c28c348da9f89cfbe33d8e06f5f88a 100644
--- a/apps/files_sharing/appinfo/update.php
+++ b/apps/files_sharing/appinfo/update.php
@@ -10,6 +10,7 @@ if (version_compare($installedVersion, '0.3', '<')) {
 	OC_Group::useBackend(new OC_Group_Database());
 	OC_App::loadApps(array('authentication'));
 	while ($row = $result->fetchRow()) {
+		$meta = \OC\Files\Filesystem::getId($path, '');
 		$itemSource = OC_FileCache::getId($row['source'], '');
 		if ($itemSource != -1) {
 			$file = OC_FileCache::get($row['source'], '');
@@ -70,4 +71,4 @@ if (version_compare($installedVersion, '0.3.3', '<')) {
 	foreach ($users as $user) {
 		OC_FileCache::delete('Shared', '/'.$user.'/files/');
 	}
-}
\ No newline at end of file
+}
diff --git a/lib/connector/sabre/directory.php b/lib/connector/sabre/directory.php
index 3df85b2bbbe28cf7aae24c6b7595a996a945c9b9..d4f58527d2172c943a6362428db6c6d4f358e510 100644
--- a/lib/connector/sabre/directory.php
+++ b/lib/connector/sabre/directory.php
@@ -93,7 +93,7 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
 
 		$path = $this->path . '/' . $name;
 		if (is_null($info)) {
-			$info = OC_Files::getFileInfo($path);
+			$info = \OC\Files\Filesystem::getFileInfo($path);
 		}
 
 		if (!$info) {
@@ -117,7 +117,7 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
 	 */
 	public function getChildren() {
 
-		$folder_content = OC_Files::getDirectoryContent($this->path);
+		$folder_content = \OC\Files\Filesystem::getDirectoryContent($this->path);
 		$paths = array();
 		foreach($folder_content as $info) {
 			$paths[] = $this->path.'/'.$info['name'];
@@ -178,7 +178,7 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
 	 * @return array
 	 */
 	public function getQuotaInfo() {
-		$rootInfo=OC_FileCache_Cached::get('');
+		$rootInfo=\OC\Files\Filesystem::getFileInfo('');
 		return array(
 			$rootInfo['size'],
 			\OC\Files\Filesystem::free_space()
diff --git a/lib/connector/sabre/node.php b/lib/connector/sabre/node.php
index e7e83507ea29ff98df85941ef857263aefe94a47..2095c956e5f2dcd12f604d07cdd13dbbf8a8d039 100644
--- a/lib/connector/sabre/node.php
+++ b/lib/connector/sabre/node.php
@@ -95,11 +95,11 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
 	}
 
 	/**
-	 * Make sure the fileinfo cache is filled. Uses OC_FileCache or a direct stat
+	 * Make sure the fileinfo cache is filled. Uses the file cache or a direct stat
 	 */
 	protected function getFileinfoCache() {
 		if (!isset($this->fileinfo_cache)) {
-			if ($fileinfo_cache = \OC\Files\Filesystem::get($this->path)) {
+			if ($fileinfo_cache = \OC\Files\Filesystem::getFileInfo($this->path)) {
 			} else {
 				$fileinfo_cache = \OC\Files\Filesystem::stat($this->path);
 			}
diff --git a/lib/fileproxy/quota.php b/lib/fileproxy/quota.php
index d120f30999826b5f8d53913c085b30359f484b46..cd9a2f4a1920c100fab24b1308385d118ec982e8 100644
--- a/lib/fileproxy/quota.php
+++ b/lib/fileproxy/quota.php
@@ -57,7 +57,7 @@ class OC_FileProxy_Quota extends OC_FileProxy{
 	 * @return int
 	 */
 	private function getFreeSpace($path) {
-		$storage=OC_Filesystem::getStorage($path);
+		list($storage,)=\OC\Files\Filesystem::resolvePath($path);
 		$owner=$storage->getOwner($path);
 
 		$totalSpace=$this->getQuota($owner);
@@ -65,13 +65,9 @@ class OC_FileProxy_Quota extends OC_FileProxy{
 			return 0;
 		}
 
-		$rootInfo=OC_FileCache::get('', "/".$owner."/files");
-		// TODO Remove after merge of share_api
-		if (OC_FileCache::inCache('/Shared', "/".$owner."/files")) {
-			$sharedInfo=OC_FileCache::get('/Shared', "/".$owner."/files");
-		} else {
-			$sharedInfo = null;
-		}
+		$view = new \OC\Files\View("/".$owner."/files");
+
+		$rootInfo=$view->getFileInfo('/');
 		$usedSpace=isset($rootInfo['size'])?$rootInfo['size']:0;
 		$usedSpace=isset($sharedInfo['size'])?$usedSpace-$sharedInfo['size']:$usedSpace;
 		return $totalSpace-$usedSpace;
diff --git a/lib/files.php b/lib/files.php
index 422e7f4ffe7c70a27e4f07c1c46c407fd76c1f5a..6a063f216d5cbe2a17d7b69a792e7fa14a02c2db 100644
--- a/lib/files.php
+++ b/lib/files.php
@@ -146,7 +146,7 @@ class OC_Files {
 		$dirname = basename($dir);
 		$zip->addEmptyDir($internalDir . $dirname);
 		$internalDir .= $dirname .= '/';
-		$files = OC_Files::getdirectorycontent($dir);
+		$files = \OC\Files\Filesystem::getDirectoryContent($dir);
 		foreach ($files as $file) {
 			$filename = $file['name'];
 			$file = $dir . '/' . $filename;
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index 4031c0c5b80287355f2c6dc03e99d6dc97bf40ea..b3c92f3855840836be74fb48156b6f95d8d05bb4 100644
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
@@ -627,6 +627,19 @@ class Filesystem {
 		return self::$defaultInstance->getFileInfo($path);
 	}
 
+	/**
+	 * change file metadata
+	 *
+	 * @param string $path
+	 * @param array $data
+	 * @return int
+	 *
+	 * returns the fileid of the updated file
+	 */
+	public static function putFileInfo($path, $data) {
+		return self::$defaultInstance->putFileInfo($path, $data);
+	}
+
 	/**
 	 * get the content of a directory
 	 *
diff --git a/lib/files/view.php b/lib/files/view.php
index ee95cce0c1d127abaaefe4d72fd198734c36da45..e9b583f8ae6902789249cde2c09286bae4e5e966 100644
--- a/lib/files/view.php
+++ b/lib/files/view.php
@@ -451,7 +451,6 @@ class View {
 						array(Filesystem::signal_param_path => $path2)
 					);
 				} else { // no real copy, file comes from somewhere else, e.g. version rollback -> just update the file cache and the webdav properties without all the other post_write actions
-//					OC_FileCache_Update::update($path2, $this->fakeRoot);
 					Filesystem::removeETagHook(array("path" => $path2), $this->fakeRoot);
 				}
 				return $result;
diff --git a/lib/ocs.php b/lib/ocs.php
index 645380ddba831c7e329b1b94541febf0d4c0237b..c6bcd2c06e17a849a7e46702810701ab9afb3e4c 100644
--- a/lib/ocs.php
+++ b/lib/ocs.php
@@ -590,8 +590,8 @@ class OC_OCS {
 				// calculate the disc space
 				$user_dir = '/'.$user.'/files';
 				\OC\Files\Filesystem::init($user_dir);
-				$rootInfo=OC_FileCache::get('');
-				$sharedInfo=OC_FileCache::get('/Shared');
+				$rootInfo=\OC\Files\Filesystem::getFileInfo('');
+				$sharedInfo=\OC\Files\Filesystem::getFileInfo('/Shared');
 				$used=$rootInfo['size']-$sharedInfo['size'];
 				$free=\OC\Files\Filesystem::free_space();
 				$total=$free+$used;
diff --git a/lib/public/share.php b/lib/public/share.php
index 7a9a087d1bd75fcc7479a0b1e7e8d6b80f2d8118..dd6c841c99d68c8149c06c057380f49b7a5fc63a 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -285,10 +285,10 @@ class Share {
 		// If the item is a folder, scan through the folder looking for equivalent item types
 		if ($itemType == 'folder') {
 			$parentFolder = self::put('folder', $itemSource, $shareType, $shareWith, $uidOwner, $permissions, true);
-			if ($parentFolder && $files = \OC_Files::getDirectoryContent($itemSource)) {
+			if ($parentFolder && $files = \OC\Files\Filesystem::getDirectoryContent($itemSource)) {
 				for ($i = 0; $i < count($files); $i++) {
 					$name = substr($files[$i]['name'], strpos($files[$i]['name'], $itemSource) - strlen($itemSource));
-					if ($files[$i]['mimetype'] == 'httpd/unix-directory' && $children = \OC_Files::getDirectoryContent($name, '/')) {
+					if ($files[$i]['mimetype'] == 'httpd/unix-directory' && $children = \OC\Files\Filesystem::getDirectoryContent($name, '/')) {
 						// Continue scanning into child folders
 						array_push($files, $children);
 					} else {
@@ -768,9 +768,10 @@ class Share {
 									if ($row['item_type'] == 'file' || $row['item_type'] == 'folder') {
 										$childItem['file_source'] = $child['source'];
 									} else {
-										$childItem['file_source'] = \OC_FileCache::getId($child['file_path']);
+										$meta = \OC\Files\Filesystem::getFileInfo($child['file_path']);
+										$childItem['file_source'] = $meta['fileid'];
 									}
-									$childItem['file_target'] = \OC_Filesystem::normalizePath($child['file_path']);
+									$childItem['file_target'] = \OC\Files\Filesystem::normalizePath($child['file_path']);
 								}
 								if (isset($item)) {
 									if ($childItem[$column] == $item) {
@@ -881,7 +882,8 @@ class Share {
 				if ($itemType == 'file' || $itemType == 'folder') {
 					$fileSource = $itemSource;
 				} else {
-					$fileSource = \OC_FileCache::getId($filePath);
+					$meta = \OC\Files\Filesystem::getFileInfo($filePath);
+					$fileSource = $meta['fileid'];
 				}
 				if ($fileSource == -1) {
 					$message = 'Sharing '.$itemSource.' failed, because the file could not be found in the file cache';
@@ -1063,7 +1065,8 @@ class Share {
 						}
 						if ($item['uid_owner'] == $uidOwner) {
 							if ($itemType == 'file' || $itemType == 'folder') {
-								if ($item['file_source'] == \OC_FileCache::getId($itemSource)) {
+								$meta = \OC\Files\Filesystem::getFileInfo($itemSource);
+								if ($item['file_source'] == $meta['fileid']) {
 									return $target;
 								}
 							} else if ($item['item_source'] == $itemSource) {
diff --git a/lib/search/provider/file.php b/lib/search/provider/file.php
index 0d4b332b792bc75aff29c0e86873a382dc3f42f1..456e12b5ec2028ec3ae44f806aa43696d86af7ee 100644
--- a/lib/search/provider/file.php
+++ b/lib/search/provider/file.php
@@ -2,7 +2,7 @@
 
 class OC_Search_Provider_File extends OC_Search_Provider{
 	function search($query) {
-		$files=OC_FileCache::search($query, true);
+		$files=\OC\Files\Filesystem::search($query, true);
 		$results=array();
 		$l=OC_L10N::get('lib');
 		foreach($files as $fileData) {
diff --git a/settings/personal.php b/settings/personal.php
index c73a3dd37018d97ef3f7c514c933f45bab61424e..5a267ec2844d8da77c5563b736efb2d18d72daed 100644
--- a/settings/personal.php
+++ b/settings/personal.php
@@ -16,8 +16,8 @@ OC_Util::addStyle( '3rdparty', 'chosen' );
 OC_App::setActiveNavigationEntry( 'personal' );
 
 // calculate the disc space
-$rootInfo=OC_FileCache::get('');
-$sharedInfo=OC_FileCache::get('/Shared');
+$rootInfo=\OC\Files\Filesystem::getFileInfo('');
+$sharedInfo=\OC\Files\Filesystem::getFileInfo('/Shared');
 $used=$rootInfo['size'];
 if($used<0) $used=0;
 $free=\OC\Files\Filesystem::free_space();