pekko-connectors-sample-ftp-to-file/src/main/java/playground/filesystem/impl/JimfsFtpFile.java [212:232]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public boolean move(final FtpFile dest) {
        boolean retVal = false;
        if (dest.isWritable() && isReadable()) {
            Path destPath = ((JimfsFtpFile) dest).path;

            if (Files.exists(destPath)) {
                // renameTo behaves differently on different platforms
                // this check verifies that if the destination already exists,
                // we fail
                retVal = false;
            } else {
                try {
                    Files.move(path, destPath, StandardCopyOption.REPLACE_EXISTING);
                    retVal = true;
                } catch (IOException t) {
                    LOG.error(t.getMessage());
                }
            }
        }
        return retVal;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



pekko-connectors-sample-rotate-logs-to-ftp/src/main/java/playground/filesystem/impl/JimfsFtpFile.java [212:232]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public boolean move(final FtpFile dest) {
    boolean retVal = false;
    if (dest.isWritable() && isReadable()) {
      Path destPath = ((JimfsFtpFile) dest).path;

      if (Files.exists(destPath)) {
        // renameTo behaves differently on different platforms
        // this check verifies that if the destination already exists,
        // we fail
        retVal = false;
      } else {
        try {
          Files.move(path, destPath, StandardCopyOption.REPLACE_EXISTING);
          retVal = true;
        } catch (IOException t) {
          LOG.error(t.getMessage());
        }
      }
    }
    return retVal;
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



