Error handling

SFTP.jl handles multiple errors related to server access and file structure on the remote system. Error codes are defined by the ErrorCode enum and used as error code in Base.IOError.

SFTP.ErrorCodeType

Enum ErrorCode

Error codes for SFTP connection and remote filesystem errors:

EC_INSTANTIATION_ERROR = -1
EC_NOERROR = 0
EC_ACCESS_DENIED = 1
EC_NOT_A_FILE = 2
EC_NOT_A_DIR = 3
EC_NOT_A_PATH = 4
EC_FILE_NOT_FOUND = 5
EC_DIR_NOT_FOUND = 6
EC_PATH_NOT_FOUND = 7
EC_FILE_EXISTS = 8
EC_DIR_EXISTS = 9
EC_PATH_EXISTS = 10
EC_NONEMPTY_DIR = 11
EC_BROKEN_LINK = 12
EC_INVALID_SCAN = 13
source