/** returns true if the file exists */ public boolean exists(String filename) throws FileResourceException { try { return ftpClient.exists(filename); } catch (Exception e) { throw translateException("Cannot determine the existence of the file", e); } }
/** * Tests whether the file denoted by this abstract pathname exists. * * @return <code>true</code> if and only if the file denoted by this abstract pathname exists; * <code>false</code> otherwise */ public boolean exists() { try { ftpClient.exists(getPath()); } catch (IOException e) { return false; } catch (FTPException e) { return false; } return true; }