*/\r
public static function isEncryptedMeta( $path ) {\r
\r
- // TODO: Use DI to get OC_FileCache_Cached out of here\r
+ // TODO: Use DI to get \OC\Files\Filesystem out of here\r
\r
// Fetch all file metadata from DB\r
- $metadata = \OC_FileCache_Cached::get( $path, '' );\r
+ $metadata = \OC\Files\Filesystem::getFileInfo( $path, '' );\r
\r
// Return encryption status\r
return isset( $metadata['encrypted'] ) and ( bool )$metadata['encrypted'];\r
public static function isLegacyEncryptedContent( $content ) {\r
\r
// Fetch all file metadata from DB\r
- $metadata = \OC_FileCache_Cached::get( $content, '' );\r
+ $metadata = \OC\Files\Filesystem::getFileInfo( $content, '' );\r
\r
// If a file is flagged with encryption in DB, but isn't a \r
// valid content + IV combination, it's probably using the \r
Keymanager::setFileKey( $view, $filePath, $userId, $encrypted['key'] );
// Update the file cache with file info
- \OC_FileCache::put( $path, array( 'encrypted'=>true, 'size' => $size ), '' );
+ \OC\Files\Filesystem::putFileInfo( $path, array( 'encrypted'=>true, 'size' => $size ), '' );
// Re-enable proxy - our work is done
\OC_FileProxy::$enabled = true;
$filePath = '/' . implode( '/', $filePath );
- //$cached = \OC_FileCache_Cached::get( $path, '' );
+ //$cached = \OC\Files\Filesystem::getFileInfo( $path, '' );
$view = new \OC_FilesystemView( '' );
if ( Crypt::isCatfile( $path ) ) {
- $cached = \OC_FileCache_Cached::get( $path, '' );
+ $cached = \OC\Files\Filesystem::getFileInfo( $path, '' );
$data['size'] = $cached['size'];
if ( Crypt::isCatfile( $path ) ) {
- $cached = \OC_FileCache_Cached::get( $path, '' );
+ $cached = \OC\Files\Filesystem::getFileInfo( $path, '' );
return $cached['size'];