diff options
author | Robin <robin@Amaya.(none)> | 2010-05-11 20:35:29 +0200 |
---|---|---|
committer | Robin <robin@Amaya.(none)> | 2010-05-11 20:35:29 +0200 |
commit | 9e05a0d59295d8bd512df9493e90b5811414cefd (patch) | |
tree | 572cbe39796f82b0ce12b7e84de97422fce7aa3a /files | |
parent | 672297531bbd0b161ba393f8eba0ada84310f2ce (diff) | |
download | nextcloud-server-9e05a0d59295d8bd512df9493e90b5811414cefd.tar.gz nextcloud-server-9e05a0d59295d8bd512df9493e90b5811414cefd.zip |
webdav fixes
Diffstat (limited to 'files')
-rwxr-xr-x | files/api.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/files/api.php b/files/api.php index 12bc49dd7f0..014bbb56bbc 100755 --- a/files/api.php +++ b/files/api.php @@ -35,22 +35,28 @@ ob_clean(); if($arguments['action']){ switch($arguments['action']){ case 'delete': - OC_FILES::delete($arguments['dir'],$arguments['file']); + echo (OC_FILES::delete($arguments['dir'],$arguments['file']))?'true':'false'; break; case 'rename': - OC_FILES::move($arguments['dir'],$arguments['file'],$arguments['dir'],$arguments['newname']); + echo (OC_FILES::move($arguments['dir'],$arguments['file'],$arguments['dir'],$arguments['newname']))?'true':'false'; break; case 'new': - OC_FILES::newfile($arguments['dir'],$arguments['name'],$arguments['type']); + echo (OC_FILES::newfile($arguments['dir'],$arguments['name'],$arguments['type']))?'true':'false'; break; case 'move': - OC_FILES::move($arguments['sourcedir'],$arguments['source'],$arguments['targetdir'],$arguments['target']); + echo (OC_FILES::move($arguments['sourcedir'],$arguments['source'],$arguments['targetdir'],$arguments['target']))?'true':'false'; + break; + case 'copy': + echo (OC_FILES::copy($arguments['sourcedir'],$arguments['source'],$arguments['targetdir'],$arguments['target']))?'true':'false'; break; case 'get': OC_FILES::get($arguments['dir'],$arguments['file']); break; case 'getfiles': - echo json_encode(OC_FILES::getdirectorycontent($CONFIG_DATADIRECTORY.'/'.$arguments['dir'])); + echo json_encode(OC_FILES::getdirectorycontent($arguments['dir'])); + break; + case 'find': + echo json_encode(OC_FILESYSTEM::find($arguments['path'])); break; case 'login': if(OC_USER::login($arguments['username'],$arguments['password'])){ |