Skip to main content

shell_tunnel/fs/
mod.rs

1//! Filesystem access, confined to a configured root.
2//!
3//! Placed at the crate root rather than under `security/` because the jail is
4//! not a check that sits beside file access — it is the only way file access
5//! happens. Filing it with the other validators would invite the reading that
6//! it can be bypassed.
7
8pub mod platform;
9pub mod root;
10pub mod sha256;
11pub mod transfer;
12
13pub use root::{FsError, FsRoot};
14pub use transfer::{
15    sweep_orphan_parts, sweep_orphan_parts_in, FinishedUpload, UploadError, UploadStore,
16    DEFAULT_CHUNK_SIZE, MAX_CHUNK_SIZE, SESSION_TTL,
17};
18
19/// Directory under the root where in-flight uploads are staged.
20///
21/// Declared here rather than beside the upload store because two unrelated
22/// callers need it — `list` must hide it, and the transfer layer must create it
23/// — and a second copy of the name is a rename waiting to go wrong.
24pub const UPLOAD_DIR: &str = ".shell-tunnel-uploads";