owncloud-serv/apps/files_sharing/lib/updater.php
/**
	 * rename mount point from the children if the parent was renamed
	 * 
	 * @param string $oldPath old path relative to data/user/files
	 * @param string $newPath new path relative to data/user/files
	 */
rename mount point from the children if the parent was renamed

@param string $oldPath old path relative to data/user/files
@param string $newPath new path relative to data/user/files
rename mount point from the children if the parent was renamed @param string $oldPath old path relative to data / user / files @param string $newPath new path relative to data / user / files
static private function renameChildren($oldPath, $newPath) {
		$absNewPath =  \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files/' . $newPath);
		$absOldPath =  \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files/' . $oldPath);
		$mountManager = \OC\Files\Filesystem::getMountManager();
		$mountedShares = $mountManager->findIn('/' . \OCP\User::getUser() . '/files/' . $oldPath);
		foreach ($mountedShares as $mount) {
			if ($mount->getStorage()->instanceOfStorage('OCA\Files_Sharing\ISharedStorage')) {
				$mountPoint = $mount->getMountPoint();
				$target = str_replace($absOldPath, $absNewPath, $mountPoint);
				$mount->moveMount($target);
			}
		}
	}
static private function renameChildren ( $ oldPath , $ newPath ) { $ absNewPath = \ OC \ Files \ Filesystem :: normalizePath ( '/' . \ OCP \ User :: getUser ( ) . '/files/' . $ newPath ) ; $ absOldPath = \ OC \ Files \ Filesystem :: normalizePath ( '/' . \ OCP \ User :: getUser ( ) . '/files/' . $ oldPath ) ; $ mountManager = \ OC \ Files \ Filesystem :: getMountManager ( ) ; $ mountedShares = $ mountManager -> findIn ( '/' . \ OCP \ User :: getUser ( ) . '/files/' . $ oldPath ) ; foreach ( $ mountedShares as $ mount ) { if ( $ mount -> getStorage ( ) -> instanceOfStorage ( 'OCA\Files_Sharing\ISharedStorage' ) ) { $ mountPoint = $ mount -> getMountPoint ( ) ; $ target = str_replace ( $ absOldPath , $ absNewPath , $ mountPoint ) ; $ mount -> moveMount ( $ target ) ; } } }
rename mount point from the children if the parent was renamed
rename mount point from the children if the parent was renamed