code: public void deleteInternal(String filePath, boolean recursive) {
          //Process and validate path
          final String processedPath = processAndValidateFilePath(filePath, false);
  
          boolean deleted;
          if (recursive) {
              File fileToDelete = new File(processedPath);
              if (FileUtils.fileIsDirectory(fileToDelete)) {
                  recursiveDelete(fileToDelete);
              } else {
                  FileUtils.fileDelete(fileToDelete);
              }
              deleted = FileUtils.fileExists(fileToDelete) == false;
          } else {
              deleted = deleteLocalFile(processedPath);
          }
  
          if (!deleted) {
              IOException ioe = new IOException(TraceNLS.getFormattedMessage(this.getClass(),
                                                                             APIConstants.TRACE_BUNDLE_FILE_TRANSFER,
                                                                             "DELETE_REQUEST_ERROR",
                                                                             null,
                                                                             "CWWKX0126E: Delete request for file " + processedPath + " could not be completed."));
              throw ErrorHelper.createRESTHandlerJsonException(ioe, null, APIConstants.STATUS_BAD_REQUEST);
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isInfoEnabled()) {
              Tr.info(tc, "DELETE_REQUEST_COMPLETE_INFO", processedPath);
          }
      }
docs: Note: for delete operation we don't need to know if it's from legacy file transfer (V2) or not, because gzip is not involved here