Is it possible with FTPClient (Apache commons-net) to check if a remote directory exists?
I want to do something like this:
ftp.isDirectory(String path) //returns true, false
And then get permissions (chmod) of directory:
ftp.getPermisions(String path) //returns -rwxr-xr-x
Try to change the working directory to the directory you need to check:
boolean directoryExists = FTPClient.changeWorkingDirectory("path/to/somedir")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With