. * */ require_once realpath( dirname(__FILE__).'/../lib/files.php' ); OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); $files = new \OCA\Files\Files(); $result = $files->rename( $_GET["dir"], $_GET["file"], $_GET["newname"] ); if($result['success'] === true){ OCP\JSON::success(array('data' => $result['data'])); } else { OCP\JSON::error(array('data' => $result['data'])); }