move.php 386 B

123456789101112131415161718192021
  1. <?php
  2. // Init owncloud
  3. require_once('../../lib/base.php');
  4. OC_JSON::checkLoggedIn();
  5. // Get data
  6. $dir = $_GET["dir"];
  7. $file = $_GET["file"];
  8. $target = $_GET["target"];
  9. if(OC_Files::move($dir,$file,$target,$file)){
  10. OC_JSON::success(array("data" => array( "dir" => $dir, "files" => $file )));
  11. }else{
  12. OC_JSON::error(array("data" => array( "message" => "Could move $file" )));
  13. }
  14. ?>