Skip to content

SftpSession.exists() does not throw exception #3247

Closed
@gary-x-li

Description

@gary-x-li

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions