diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-10-22 17:33:36 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-10-24 12:18:46 +0200 |
commit | 83c74b80ad826af60d894ba91bb1e56fd2005d32 (patch) | |
tree | a9729bb74e9a69ef5e05cca79cf2ae798a4c51de /lib/private/server.php | |
parent | 0525341a1243bcf1ef992407af524e391efd7624 (diff) | |
download | nextcloud-server-83c74b80ad826af60d894ba91bb1e56fd2005d32.tar.gz nextcloud-server-83c74b80ad826af60d894ba91bb1e56fd2005d32.zip |
Add \OC\TempManager to handle creating and cleaning temporary files
Diffstat (limited to 'lib/private/server.php')
-rw-r--r-- | lib/private/server.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/server.php b/lib/private/server.php index b0d63af1554..34fd8ab48fd 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -256,6 +256,10 @@ class Server extends SimpleContainer implements IServerContainer { return new NullQueryLogger(); } }); + $this->registerService('TempManager', function ($c) { + /** @var Server $c */ + return new TempManager(get_temp_dir(), $c->getLogger()); + }); } /** @@ -617,4 +621,13 @@ class Server extends SimpleContainer implements IServerContainer { function getQueryLogger() { return $this->query('QueryLogger'); } + + /** + * Get the manager for temporary files and folders + * + * @return \OCP\ITempManager + */ + function getTempManager() { + return $this->query('TempManager'); + } } |