Closed
Description
SftpSession.exists()
method catches SftpException
but ignores it. Why not throw a NestedIOException
like other methods do?
In my code I use exists
to check whether the remote file exists or not before I call remove
to delete the file. In case when the logic inside exists
throws an IOException
(Pipe closed), it returns false
, indicating the remote file does not exists.
Thanks,
Gary