Checking file existence on FTP server
apache-commons-net, ftp, java
Solution
`listFiles(String pathName)` should work just fine for a single file.
Problem
Is there an efficient way to check the existence of a file on a FTP server? I'm using Apache Commons Net. I know that I can use the `listNames` method of `FTPClient` to get all the files in a specific directory and then I can go over this list to check if a given file exists, but I don't think it's efficient especially when the server contains a lot of files.