original_string: public function delete(LibraryType $library, array $paths): bool
      {
          // do not allow empty paths
          if (empty($paths)) {
              return false;
          }
  
          // get the folder path
          // this path must be the same for all files!
          $folderPath = dirname($paths[0]);
  
          $fileNames = $this->preparePaths($folderPath, $paths);
  
          if (empty($fileNames)) {
              return false;
          }
  
          $folderPath = str_replace("\\", "/", $folderPath); // windows compatibility
  
          $uri = sprintf(
              '%s/repos/%s/fileops/delete/?p=%s',
              $this->clipUri($this->client->getConfig('base_uri')),
              $library->id,
              $folderPath
          );
  
          $response = $this->client->request(
              'POST',
              $uri,
              [
                  'headers'   => ['Accept' => 'application/json'],
                  'multipart' => [
                      [
                          'name'     => 'file_names',
                          'contents' => $fileNames,
                      ],
                  ],
              ]
          );
  
          return $response->getStatusCode() === 200;
      }
code: public function delete(LibraryType $library, array $paths): bool
      {
          // do not allow empty paths
          if (empty($paths)) {
              return false;
          }
  
          // get the folder path
          // this path must be the same for all files!
          $folderPath = dirname($paths[0]);
  
          $fileNames = $this->preparePaths($folderPath, $paths);
  
          if (empty($fileNames)) {
              return false;
          }
  
          $folderPath = str_replace("\\", "/", $folderPath); // windows compatibility
  
          $uri = sprintf(
              '%s/repos/%s/fileops/delete/?p=%s',
              $this->clipUri($this->client->getConfig('base_uri')),
              $library->id,
              $folderPath
          );
  
          $response = $this->client->request(
              'POST',
              $uri,
              [
                  'headers'   => ['Accept' => 'application/json'],
                  'multipart' => [
                      [
                          'name'     => 'file_names',
                          'contents' => $fileNames,
                      ],
                  ],
              ]
          );
  
          return $response->getStatusCode() === 200;
      }
code_tokens: public function delete ( LibraryType $ library , array $ paths ) : bool { // do not allow empty paths if ( empty ( $ paths ) ) { return false ; } // get the folder path // this path must be the same for all files! $ folderPath = dirname ( $ paths [ 0 ] ) ; $ fileNames = $ this -> preparePaths ( $ folderPath , $ paths ) ; if ( empty ( $ fileNames ) ) { return false ; } $ folderPath = str_replace ( "\\" , "/" , $ folderPath ) ; // windows compatibility $ uri = sprintf ( '%s/repos/%s/fileops/delete/?p=%s' , $ this -> clipUri ( $ this -> client -> getConfig ( 'base_uri' ) ) , $ library -> id , $ folderPath ) ; $ response = $ this -> client -> request ( 'POST' , $ uri , [ 'headers' => [ 'Accept' => 'application/json' ] , 'multipart' => [ [ 'name' => 'file_names' , 'contents' => $ fileNames , ] , ] , ] ) ; return $ response -> getStatusCode ( ) === 200 ; }
docstring: Delete multiple files or folders
  
  @param LibraryType $library Library object
  @param array       $paths   Array with file and folder paths (they must be in the same folder)
  
  @return bool
  @throws \GuzzleHttp\Exception\GuzzleException
docstring_tokens: Delete multiple files or folders