dir_view/
lib.rs

1#![cfg_attr(doc_cfg, feature(doc_cfg, doc_auto_cfg))]
2
3mod dir;
4mod dir_entry;
5#[cfg(feature = "fs_utf8")]
6mod dir_entry_utf8;
7#[cfg(feature = "fs_utf8")]
8mod dir_utf8;
9mod read_dir;
10#[cfg(feature = "fs_utf8")]
11mod read_dir_utf8;
12
13#[cfg(feature = "cap-fs-ext")]
14pub use cap_fs_ext;
15pub use cap_std::{self, ambient_authority, AmbientAuthority};
16
17pub use dir::DirView;
18pub use dir_entry::DirEntryView;
19#[cfg(feature = "fs_utf8")]
20pub use dir_entry_utf8::DirEntryViewUtf8;
21#[cfg(feature = "fs_utf8")]
22pub use dir_utf8::DirViewUtf8;
23pub use read_dir::ReadDirView;
24#[cfg(feature = "fs_utf8")]
25pub use read_dir_utf8::ReadDirViewUtf8;
26
27/// The kind of a view.
28#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
29pub enum ViewKind {
30    /// Expose everything. The same as `cap_std::fs::Dir` itself.
31    Full,
32
33    /// Expose a readonly view. Creating, renaming, or deleting new files or
34    /// directories is not permitted, and files can only be opened in readonly
35    /// mode.
36    Readonly,
37}