mirror of
https://github.com/nextcloud/server.git
synced 2026-03-21 18:11:02 -04:00
add temporary filestorage backend for testing purposed
This commit is contained in:
parent
b40f9670ae
commit
0622fa79ba
2 changed files with 18 additions and 1 deletions
|
|
@ -3,7 +3,7 @@
|
|||
* for local filestore, we only have to map the paths
|
||||
*/
|
||||
class OC_Filestorage_Local extends OC_Filestorage{
|
||||
private $datadir;
|
||||
protected $datadir;
|
||||
private static $mimetypes=null;
|
||||
public function __construct($arguments){
|
||||
$this->datadir=$arguments['datadir'];
|
||||
|
|
|
|||
17
lib/filestorage/temporary.php
Normal file
17
lib/filestorage/temporary.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
/**
|
||||
* local storage backnd in temporary folder for testing purpores
|
||||
*/
|
||||
class OC_Filestorage_Temporary extends OC_Filestorage_Local{
|
||||
public function __construct($arguments){
|
||||
$this->datadir=OC_Helper::tmpFolder();
|
||||
}
|
||||
|
||||
public function cleanUp(){
|
||||
OC_Helper::rmdirr($this->datadir);
|
||||
}
|
||||
|
||||
public function __destruct(){
|
||||
$this->cleanUp();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue