nextcloud/lib/private/Files/Storage/Temporary.php

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
674 B
PHP
Raw Normal View History

2012-09-07 12:30:48 -04:00
<?php
2012-09-07 12:30:48 -04:00
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
2012-09-07 12:30:48 -04:00
*/
namespace OC\Files\Storage;
/**
2013-02-05 10:24:40 -05:00
* local storage backend in temporary folder for testing purpose
2012-09-07 12:30:48 -04:00
*/
class Temporary extends Local {
public function __construct($arguments = []) {
parent::__construct(['datadir' => \OC::$server->getTempManager()->getTemporaryFolder()]);
2012-09-07 12:30:48 -04:00
}
public function cleanUp() {
\OC_Helper::rmdirr($this->datadir);
}
public function __destruct() {
parent::__destruct();
2012-09-07 12:30:48 -04:00
$this->cleanUp();
}
public function getDataDir() {
return $this->datadir;
}
2012-09-07 12:30:48 -04:00
}