original_string: function nativeCopy($path, $newPath)
      {
          if (!$this->createDir(Util::dirname($newPath), new Config())) {
              return false;
          }
  
          $location    = $this->applyPathPrefix($this->encodePath($path));
          $newLocation = $this->applyPathPrefix($this->encodePath($newPath));
  
          try {
              $destination = $this->client->getAbsoluteUrl($newLocation);
              $response    = $this->client->request('COPY', '/' . ltrim($location, '/'), null, [
                  'Destination' => $destination,
              ]);
  
              if ($response['statusCode'] >= 200 && $response['statusCode'] < 300) {
                  return true;
              }
          } catch (NotFound $e) {
              // Would have returned false here, but would be redundant
          }
  
          return false;
      }
code: function nativeCopy($path, $newPath)
      {
          if (!$this->createDir(Util::dirname($newPath), new Config())) {
              return false;
          }
  
          $location    = $this->applyPathPrefix($this->encodePath($path));
          $newLocation = $this->applyPathPrefix($this->encodePath($newPath));
  
          try {
              $destination = $this->client->getAbsoluteUrl($newLocation);
              $response    = $this->client->request('COPY', '/' . ltrim($location, '/'), null, [
                  'Destination' => $destination,
              ]);
  
              if ($response['statusCode'] >= 200 && $response['statusCode'] < 300) {
                  return true;
              }
          } catch (NotFound $e) {
              // Would have returned false here, but would be redundant
          }
  
          return false;
      }
code_tokens: function nativeCopy ( $ path , $ newPath ) { if ( ! $ this -> createDir ( Util :: dirname ( $ newPath ) , new Config ( ) ) ) { return false ; } $ location = $ this -> applyPathPrefix ( $ this -> encodePath ( $ path ) ) ; $ newLocation = $ this -> applyPathPrefix ( $ this -> encodePath ( $ newPath ) ) ; try { $ destination = $ this -> client -> getAbsoluteUrl ( $ newLocation ) ; $ response = $ this -> client -> request ( 'COPY' , '/' . ltrim ( $ location , '/' ) , null , [ 'Destination' => $ destination , ] ) ; if ( $ response [ 'statusCode' ] >= 200 && $ response [ 'statusCode' ] < 300 ) { return true ; } } catch ( NotFound $ e ) { // Would have returned false here, but would be redundant } return false ; }
docstring: Copy a file through WebDav COPY method.
  
  @param string $path
  @param string $newPath
  
  @return bool
docstring_tokens: Copy a file through WebDav COPY method .