diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-01-15 16:01:52 +0300 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-01-15 16:01:52 +0300 |
commit | db51d9aacb743f71109a801586c9e08c6c63a3fe (patch) | |
tree | 861bec61d14007db05ec0c9bf1fb4bfea895c3ea /lib/private | |
parent | d534f262aaa21773df5a55099e0d95d2d96434e2 (diff) |
Add View::getMount() for stable7
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/files/view.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 430e9e6900b..89cbbefb521 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -113,6 +113,19 @@ class View { } /** + * get the mountpoint of the storage object for a path + * ( note: because a storage is not always mounted inside the fakeroot, the + * returned mountpoint is relative to the absolute root of the filesystem + * and doesn't take the chroot into account ) + * + * @param string $path + * @return \OC\Files\Mount\Mount + */ + public function getMount($path) { + return Filesystem::getMountManager()->find($this->getAbsolutePath($path)); + } + + /** * resolve a path to a storage and internal path * * @param string $path |