code: @Override
    public void downloadToLocalDirectory(IProgressMonitor monitor, File dir) {
      if (!dir.exists())
        dir.mkdirs();
  
      if (!dir.isDirectory()) {
        MessageDialog.openError(null, "Download to local file system",
            "Invalid directory location: \"" + dir + "\"");
        return;
      }
  
      File dfsPath = new File(this.getPath().toString());
      File destination = new File(dir, dfsPath.getName());
  
      if (!destination.exists()) {
        if (!destination.mkdir()) {
          MessageDialog.openError(null, "Download to local directory",
              "Unable to create directory " + destination.getAbsolutePath());
          return;
        }
      }
  
      // Download all DfsPath children
      for (Object childObj : getChildren()) {
        if (childObj instanceof DFSPath) {
          ((DFSPath) childObj).downloadToLocalDirectory(monitor, destination);
          monitor.worked(1);
        }
      }
    }
docs: /* @inheritDoc