mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
add option to wrap existing mounts
This commit is contained in:
parent
4e490b0688
commit
f4b6a8aa08
2 changed files with 14 additions and 0 deletions
|
|
@ -95,6 +95,13 @@ class Manager {
|
|||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Mount[]
|
||||
*/
|
||||
public function getAll() {
|
||||
return $this->mounts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find mounts by numeric storage id
|
||||
*
|
||||
|
|
|
|||
|
|
@ -138,4 +138,11 @@ class Mount {
|
|||
}
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param callable $wrapper
|
||||
*/
|
||||
public function wrapStorage($wrapper) {
|
||||
$this->storage = $wrapper($this->mountPoint, $this->storage);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue