Expand description
SFTP v3 wire format.
Structs§
- Attrs
- The subset of SSH_FXP_ATTRS the origin layer needs.
- Dec
- Bounds-checked reader. Every accessor returns None rather than panicking so a malformed reply from the remote cannot take the daemon down.
- Enc
- Big-endian encoder, chained by value so one request is one expression.
Constants§
- ATTRS
- CLOSE
- DATA
- FXF_
APPEND - In append mode the offset in each WRITE is ignored and the server places the data at the end. That is what makes a single-writer log safe without any locking.
- FXF_
CREAT - FXF_
READ - FXF_
WRITE - HANDLE
- INIT
- LSTAT
- MKDIR
- NAME
- OPEN
- OPENDIR
- READ
- READDIR
- REALPATH
- STATUS
- STATUS_
EOF - A read ending in SSH_FX_EOF is a normal end of file. Any other status is a real failure, and conflating the two turns a directory into an empty 200.
- STATUS_
NO_ SUCH_ FILE - SSH_FX_NO_SUCH_FILE: the one refusal that means “there is nothing there” rather than “something went wrong”. Everything else — a permission problem, a dead session, a server that simply failed — has to stay distinguishable from it, because the difference is the difference between an empty answer and an error.
- STATUS_
OK - SSH_FX_OK, the only status a write may answer with.
- VERSION
- WRITE
Functions§
- owner_
of_ longname - The owner’s account name out of an SFTP v3
longname, if one can be read with confidence.