original_string: function copy_file($src_path, $dst_path, $overwrite) {
          $this->_path = $this->translate_uri($src_path);
          $this->header_unset();
          $this->create_basic_request('COPY');
          $this->header_add(sprintf('Destination: http://%s%s', $this->_server, $this->translate_uri($dst_path)));
          if ($overwrite) {
              $this->header_add('Overwrite: T');
          } else {
              $this->header_add('Overwrite: F');
          }
          $this->header_add('');
          $this->send_request();
          $this->get_respond();
          $response = $this->process_respond();
          // validate the response ...
          // check http-version
          if ($response['status']['http-version'] == 'HTTP/1.1' ||
              $response['status']['http-version'] == 'HTTP/1.0') {
           /* seems to be http ... proceed
               just return what server gave us (as defined in rfc 2518) :
               201 (Created) - The source resource was successfully copied. The copy operation resulted in the creation of a new resource.
               204 (No Content) - The source resource was successfully copied to a pre-existing destination resource.
               403 (Forbidden) - The source and destination URIs are the same.
               409 (Conflict) - A resource cannot be created at the destination until one or more intermediate collections have been created.
               412 (Precondition Failed) - The server was unable to maintain the liveness of the properties listed in the propertybehavior XML element
                       or the Overwrite header is "F" and the state of the destination resource is non-null.
               423 (Locked) - The destination resource was locked.
               502 (Bad Gateway) - This may occur when the destination is on another server and the destination server refuses to accept the resource.
               507 (Insufficient Storage) - The destination resource does not have sufficient space to record the state of the resource after the
                       execution of this method.
            */
                  return $response['status']['status-code'];
              }
          return false;
      }
code: function copy_file($src_path, $dst_path, $overwrite) {
          $this->_path = $this->translate_uri($src_path);
          $this->header_unset();
          $this->create_basic_request('COPY');
          $this->header_add(sprintf('Destination: http://%s%s', $this->_server, $this->translate_uri($dst_path)));
          if ($overwrite) {
              $this->header_add('Overwrite: T');
          } else {
              $this->header_add('Overwrite: F');
          }
          $this->header_add('');
          $this->send_request();
          $this->get_respond();
          $response = $this->process_respond();
          // validate the response ...
          // check http-version
          if ($response['status']['http-version'] == 'HTTP/1.1' ||
              $response['status']['http-version'] == 'HTTP/1.0') {
           /* seems to be http ... proceed
               just return what server gave us (as defined in rfc 2518) :
               201 (Created) - The source resource was successfully copied. The copy operation resulted in the creation of a new resource.
               204 (No Content) - The source resource was successfully copied to a pre-existing destination resource.
               403 (Forbidden) - The source and destination URIs are the same.
               409 (Conflict) - A resource cannot be created at the destination until one or more intermediate collections have been created.
               412 (Precondition Failed) - The server was unable to maintain the liveness of the properties listed in the propertybehavior XML element
                       or the Overwrite header is "F" and the state of the destination resource is non-null.
               423 (Locked) - The destination resource was locked.
               502 (Bad Gateway) - This may occur when the destination is on another server and the destination server refuses to accept the resource.
               507 (Insufficient Storage) - The destination resource does not have sufficient space to record the state of the resource after the
                       execution of this method.
            */
                  return $response['status']['status-code'];
              }
          return false;
      }
code_tokens: function copy_file ( $ src_path , $ dst_path , $ overwrite ) { $ this -> _path = $ this -> translate_uri ( $ src_path ) ; $ this -> header_unset ( ) ; $ this -> create_basic_request ( 'COPY' ) ; $ this -> header_add ( sprintf ( 'Destination: http://%s%s' , $ this -> _server , $ this -> translate_uri ( $ dst_path ) ) ) ; if ( $ overwrite ) { $ this -> header_add ( 'Overwrite: T' ) ; } else { $ this -> header_add ( 'Overwrite: F' ) ; } $ this -> header_add ( '' ) ; $ this -> send_request ( ) ; $ this -> get_respond ( ) ; $ response = $ this -> process_respond ( ) ; // validate the response ... // check http-version if ( $ response [ 'status' ] [ 'http-version' ] == 'HTTP/1.1' || $ response [ 'status' ] [ 'http-version' ] == 'HTTP/1.0' ) { /* seems to be http ... proceed
               just return what server gave us (as defined in rfc 2518) :
               201 (Created) - The source resource was successfully copied. The copy operation resulted in the creation of a new resource.
               204 (No Content) - The source resource was successfully copied to a pre-existing destination resource.
               403 (Forbidden) - The source and destination URIs are the same.
               409 (Conflict) - A resource cannot be created at the destination until one or more intermediate collections have been created.
               412 (Precondition Failed) - The server was unable to maintain the liveness of the properties listed in the propertybehavior XML element
                       or the Overwrite header is "F" and the state of the destination resource is non-null.
               423 (Locked) - The destination resource was locked.
               502 (Bad Gateway) - This may occur when the destination is on another server and the destination server refuses to accept the resource.
               507 (Insufficient Storage) - The destination resource does not have sufficient space to record the state of the resource after the
                       execution of this method.
            */ return $ response [ 'status' ] [ 'status-code' ] ; } return false ; }
docstring: Public method copy_file
  
  Copies a file on a webdav server
  
  Duplicates a file on the webdav server (serverside).
  All work is done on the webdav server. If you set param overwrite as true,
  the target will be overwritten.
  
  @param string src_path, string dest_path, bool overwrite
  @return int status code (look at rfc 2518). false on error.
docstring_tokens: Public method copy_file