code: @Override
    public void downloadToLocalDirectory(IProgressMonitor monitor, File dir) {
  
      File dfsPath = new File(this.getPath().toString());
      File destination = new File(dir, dfsPath.getName());
  
      if (destination.exists()) {
        boolean answer =
            MessageDialog.openQuestion(null, "Overwrite existing local file?",
                "The file you are attempting to download from the DFS "
                    + this.getPath()
                    + ", already exists in your local directory as "
                    + destination + ".\n" + "Overwrite the existing file?");
        if (!answer)
          return;
      }
  
      try {
        this.downloadToLocalFile(monitor, destination);
  
      } catch (Exception e) {
        e.printStackTrace();
        MessageDialog.openWarning(null, "Download to local file system",
            "Downloading of file \"" + this.path + "\" to local directory \""
                + dir + "\" has failed.\n" + e);
      }
    }
docs: /* @inheritDoc