Expand description
Filesystem endpoints.
Every path in here reaches the disk through FsRoot and by no other route.
The handlers hold no path logic of their own — that separation is what makes
the jail auditable by reading one file.
Re-exports§
pub use crate::fs::UPLOAD_DIR;
Structs§
- Create
Upload - Body of
POST /api/v1/fs/uploads. - FsEntry
- One filesystem entry, as reported by
statand by eachlistitem. - List
Query - Query parameters for
list. - List
Response - One page of entries.
- Path
Query - Query parameters shared by the single-path endpoints.
- Upload
State - Reply describing a session’s current state.
Enums§
- Range
Outcome - The outcome of interpreting a
Rangeheader against a file ofsizebytes.
Constants§
- DEFAULT_
LIST_ LIMIT - Default page size for
list. - MAX_
LIST_ LIMIT - Largest page a caller may ask for. Requests above it are clamped, not refused.
Functions§
- append_
chunk PATCH /api/v1/fs/uploads/{id}— append one chunk.- cancel_
upload DELETE /api/v1/fs/uploads/{id}— abandon a session.- complete_
upload POST /api/v1/fs/uploads/{id}/complete— verify and publish.- create_
upload POST /api/v1/fs/uploads— open a session.- delete_
file DELETE /api/v1/fs/file— remove one named entry.- download
GET /api/v1/fs/file— the whole file, or a range of it.- entry_
for - Build an entry for one already-resolved path.
- error_
response - Render a refusal as JSON with a machine-readable code.
- etag_
for - A validator that changes whenever the bytes at a path might have changed.
- fs_
error_ response - Map a jail refusal onto HTTP.
- fs_
not_ enabled - The refusal sent when no
--fs-rootwas configured. - list
GET /api/v1/fs/list— one page of a directory’s contents.- mtime_
ms - Milliseconds since the Unix epoch, or zero when the clock says otherwise.
- parse_
content_ range_ start - The start offset named by a
Content-Rangerequest header. - parse_
range - Parse a single-range
Rangeheader against a file ofsizebytes. - stat
GET /api/v1/fs/stat— one entry, file or directory.- sweep_
expired_ uploads - Drop upload sessions idle past
ttl, recording a terminal event for each. - sweep_
orphaned_ uploads - Remove
.partstaging files left behind by a previous run, recording a terminal event for each. - upload_
status GET /api/v1/fs/uploads/{id}— where to resume from.