public static String getStatusText ( int status ) { switch ( status ) { case SSH_FX_OK : return "OK" ; case SSH_FX_EOF : return "EOF" ; case SSH_FX_NO_SUCH_FILE : return "No such file." ; case SSH_FX_PERMISSION_DENIED : return "Permission denied." ; case SSH_FX_FAILURE : return "Server responded with an unknown failure." ; case SSH_FX_BAD_MESSAGE : return "Server responded to a bad message." ; case SSH_FX_NO_CONNECTION : return "No connection available." ; case SSH_FX_CONNECTION_LOST : return "Connection lost." ; case SSH_FX_OP_UNSUPPORTED : return "The operation is unsupported." ; case SSH_FX_INVALID_HANDLE : case INVALID_HANDLE : return "Invalid file handle." ; case SSH_FX_NO_SUCH_PATH : return "No such path." ; case SSH_FX_FILE_ALREADY_EXISTS : return "File already exists." ; case SSH_FX_WRITE_PROTECT : return "Write protect error." ; case SSH_FX_NO_MEDIA : return "No media at location" ; case SSH_FX_NO_SPACE_ON_FILESYSTEM : return "No space on filesystem" ; case SSH_FX_QUOTA_EXCEEDED : return "Quota exceeded" ; case SSH_FX_UNKNOWN_PRINCIPAL : return "Unknown principal" ; case SSH_FX_LOCK_CONFLICT : return "Lock conflict" ; case SSH_FX_DIR_NOT_EMPTY : return "Dir not empty" ; case SSH_FX_NOT_A_DIRECTORY : return "Not a directory" ; case SSH_FX_INVALID_FILENAME : return "Invalid filename" ; case SSH_FX_LINK_LOOP : return "Link loop" ; case SSH_FX_CANNOT_DELETE : return "Cannot delete" ; case SSH_FX_INVALID_PARAMETER : return "Invalid parameter" ; case SSH_FX_FILE_IS_A_DIRECTORY : return "File is a directory" ; case SSH_FX_BYTE_RANGE_LOCK_CONFLICT : return "Byte range lock conflict" ; case SSH_FX_BYTE_RANGE_LOCK_REFUSED : return "Byte range lock refused" ; case SSH_FX_DELETE_PENDING : return "Delete pending" ; case SSH_FX_FILE_CORRUPT : return "File corrupt" ; case SSH_FX_OWNER_INVALID : return "Owner invalid" ; case SSH_FX_GROUP_INVALID : return "Group invalid" ; case SSH_FX_NO_MATCHING_BYTE_RANGE_LOCK : return "No matching byte range lock" ; case INVALID_RESUME_STATE : return "Invalid resume state" ; default : return "Unknown status type " + String . valueOf ( status ) ; } }
Convert a SSH_FXP_STATUS code into a readable string