Ejemplo n.º 1
0
  @Override
  protected boolean doIsSameFile(FileObject destFile) throws FileSystemException {
    if (!FileObjectUtils.isInstanceOf(destFile, LocalFile.class)) {
      return false;
    }

    LocalFile destLocalFile = (LocalFile) FileObjectUtils.getAbstractFileObject(destFile);
    if (!exists() || !destLocalFile.exists()) {
      return false;
    }

    try {
      return file.getCanonicalPath().equals(destLocalFile.file.getCanonicalPath());
    } catch (IOException e) {
      throw new FileSystemException(e);
    }
  }