@Override
  public File toFile() {
    if (getFileSystem().provider().getScheme().equals("file")) {
      return new File(myDelegate.toString());
    }
    else {
      // It will likely fail because the local file system should be handled with the other branch.
      return myDelegate.toFile();
    }
  }
@Override
  public File toFile()