I´m trying to check if a file exists in an SFTP server, currently I'm using JSch library and executing an "ls" command and then working with the output from server.
I don't know if fetching the output from server is the only way to do this, it's there a better way to do this?