apps/encryption/lib/Migration.php
/**
	 * reorganize folder structure for user
	 *
	 * @param string $user
	 */
reorganize folder structure for user
@param string $user
reorganize folder structure for user @param string $user
public function reorganizeFolderStructureForUser($user) {
		\OC_Util::tearDownFS();
		\OC_Util::setupFS($user);
		if ($this->backupUserKeys($user)) {
			$this->renameUsersPrivateKey($user);
			$this->renameUsersPublicKey($user);
			$path = '/files_encryption/keys';
			$this->renameFileKeys($user, $path);
			$trashPath = '/files_trashbin/keys';
			if (\OC_App::isEnabled('files_trashbin') && $this->view->is_dir($user . '/' . $trashPath)) {
				$this->renameFileKeys($user, $trashPath, true);
				$this->view->deleteAll($trashPath);
			}
			$this->deleteOldKeys($user);
			$this->view->getMount('/' . $user)->getStorage()->getScanner()->scan('files_encryption');
		}
	}
public function reorganizeFolderStructureForUser ( $ user ) { \ OC_Util :: tearDownFS ( ) ; \ OC_Util :: setupFS ( $ user ) ; if ( $ this -> backupUserKeys ( $ user ) ) { $ this -> renameUsersPrivateKey ( $ user ) ; $ this -> renameUsersPublicKey ( $ user ) ; $ path = '/files_encryption/keys' ; $ this -> renameFileKeys ( $ user , $ path ) ; $ trashPath = '/files_trashbin/keys' ; if ( \ OC_App :: isEnabled ( 'files_trashbin' ) && $ this -> view -> is_dir ( $ user . '/' . $ trashPath ) ) { $ this -> renameFileKeys ( $ user , $ trashPath , true ) ; $ this -> view -> deleteAll ( $ trashPath ) ; } $ this -> deleteOldKeys ( $ user ) ; $ this -> view -> getMount ( '/' . $ user ) -> getStorage ( ) -> getScanner ( ) -> scan ( 'files_encryption' ) ; } }
reorganize folder structure for user
 @param string $user
reorganize folder structure for user @param string $user
// backup all keys // rename users private key // rename file keys // delete old folders