Skip to main content

vfsi_sync/
lib.rs

1//! Synchronous filesystem contracts.
2//!
3//! `FileSystem` supports owned handles. `Backend` adds vector engines and
4//! overridable workflows; shared helpers compose those engines.
5
6pub use vfsi_core::*;
7
8#[doc(hidden)]
9pub mod path {
10    pub use vfsi_core::path::*;
11}
12
13mod traits;
14pub use traits::{BackendDirectoryPage, DirPageCursor, DirectoryPage, ReadAllOptions};
15mod io;
16pub use io::{VfFileHandle, VfOpenOptions};
17mod client;
18mod traversal;
19pub use client::{FsClient, FsDir, FsFile, FsRead, FsReadInto, FsWrite, OpenOptions, SetMetadata};
20pub use traversal::walk_events;
21#[doc(hidden)]
22pub mod backend_helpers;
23mod native;
24pub use native::{Backend, FileSystem};
25
26/// Scalar/singular view of the synchronous interface.
27pub mod sfsi {
28    pub use crate::{
29        DepthLimit, DirPageCursor, FileSystem, FsClient, FsFile, OpenOptions, ReadDirOptions,
30        ReadStreamOptions, WalkOptions,
31    };
32    pub use vfsi_core::{Fd, VfAttrs, VfError, VfFile, VfOffset, VfResult, VfType};
33}
34
35/// Vectorized view of the synchronous interface.
36pub mod vfsi {
37    pub use crate::{
38        Backend, DEFAULT_DIRECTORY_MAX_ENTRIES, DEFAULT_DIRECTORY_MAX_PATH_BYTES,
39        DEFAULT_READ_ALLV_MAX_TOTAL_BYTES, DEFAULT_READ_MAX_BYTES, DEFAULT_READ_STREAM_CHUNK_BYTES,
40        DEFAULT_WALK_MAX_DEPTH, DepthLimit, DirPageCursor, ReadAllOptions, ReadDirOptions,
41        ReadStreamOptions, WalkOptions,
42    };
43    pub use vfsi_core::*;
44}
45
46#[cfg(feature = "test-support")]
47#[doc(hidden)]
48pub mod test_support;
49
50// Preserve backend-facing paths while the canonical portable types live in core.
51pub use vfsi_core::api::{
52    DEFAULT_DIRECTORY_MAX_ENTRIES, DEFAULT_DIRECTORY_MAX_PATH_BYTES,
53    DEFAULT_READ_ALLV_MAX_TOTAL_BYTES, DEFAULT_READ_MAX_BYTES, DEFAULT_READ_STREAM_CHUNK_BYTES,
54    DEFAULT_READV_MAX_TOTAL_BYTES, DEFAULT_WALK_MAX_DEPTH, DepthLimit, DirectoryListing,
55    ReadDirOptions, ReadIntoResult as FsReadIntoResult, ReadStreamOptions, ResourceLimits,
56    StreamCompletion, TraversalCompletion, WalkControl, WalkEvent, WalkEventKind, WalkOptions,
57    WriteResult as FsWriteResult,
58};
59
60#[doc(hidden)]
61pub mod application;
62
63pub use vfsi_core::api::internal::OwnedReadResult as FsReadResult;