Skip to main content

coven_foundation/files/
mod.rs

1//! Files on disk: the store layout, directory, settings and exclusive lock.
2
3#[cfg(target_vendor = "apple")]
4mod asset_files;
5#[cfg(target_vendor = "apple")]
6pub use asset_files::{AssetFile, AssetFiles};
7
8mod atomic_file;
9mod bootstrap;
10mod creation;
11mod deletion;
12mod device_reset;
13mod directory;
14mod file_budget;
15mod file_lock;
16mod file_reader;
17mod flush_batch;
18mod folder_copy;
19mod held_open;
20mod layout;
21mod lock;
22mod lock_registry;
23mod observed_file;
24#[cfg(any(test, feature = "test-utils"))]
25mod open_files;
26mod path_bytes;
27#[cfg(target_vendor = "apple")]
28mod protection;
29#[cfg(not(target_vendor = "apple"))]
30#[path = "protection_elsewhere.rs"]
31mod protection;
32#[cfg(any(test, feature = "test-utils"))]
33mod reached;
34mod relative_path;
35mod replacement;
36mod set_aside;
37mod settings;
38#[cfg(any(test, feature = "test-utils"))]
39mod tree_copy;
40
41#[cfg(any(test, feature = "in-memory-keychain"))]
42pub use atomic_file::read_existing;
43pub use atomic_file::{replace as write_atomic, AtomicFile, FileError, FileWriter, WriterFolder};
44pub use bootstrap::{BootstrapDirectoryError, BootstrapStore};
45pub use creation::DirectoryCreationError;
46pub use deletion::IfUnsent;
47pub use device_reset::{
48    DeviceReset, Registration, ReplacedBy, ReplacementPhase, ReplacementRecord,
49};
50#[cfg(any(test, feature = "test-utils"))]
51pub use directory::StoreLockProbe;
52pub use directory::{
53    settle_files, verify_lock, FileArea, FileName, FileNameError, StagedName, StagingFolderError,
54    StoreDir, StoreDirAccess, StoreFile, WriterError,
55};
56#[cfg(any(test, feature = "test-utils"))]
57pub use file_budget::FileBudgetWatch;
58pub use file_budget::{FileBudget, FileLease, LeasePlace, LeaseTooLarge, LeasedFile};
59pub use file_lock::{FileLock, LockMode};
60pub use file_reader::FileReader;
61#[cfg(any(test, feature = "test-utils"))]
62pub use flush_batch::FlushHook;
63pub use flush_batch::{FlushBatch, Flushed};
64pub use folder_copy::{CopyFolder, CopyPathError, CopyPlan, CopyWriter, MadeFolder, RecordedCopy};
65pub use layout::{ListedDirectory, StoreDirectories};
66#[cfg(any(test, feature = "test-utils"))]
67pub use lock::{bootstrap_lock, cache_writes_lock, writer_lock};
68pub use lock::{
69    CacheWriteLock, ClosedStoreLock, StoreClosingGuard, StoreDeletionLock, StoreLock,
70    StoreLockError, StoreReadLock,
71};
72pub use observed_file::{ObservationError, ObservedFile, UserOriginal};
73#[cfg(any(test, feature = "test-utils"))]
74pub use open_files::{assert_no_open_files_under, open_files_under};
75pub use path_bytes::{path_bytes, path_bytes_text, path_from_bytes, path_text, PathBytesError};
76#[cfg(target_vendor = "apple")]
77pub use protection::FileProtection;
78#[cfg(all(target_vendor = "apple", any(test, feature = "test-utils")))]
79pub use protection::ProtectionSupport;
80#[cfg(any(test, feature = "test-utils"))]
81pub use reached::when_reached;
82pub use relative_path::{RelativePath, RelativePathError};
83pub use replacement::ReplacementStore;
84pub use settings::{SettingsError, StoreSettings};
85#[cfg(any(test, feature = "test-utils"))]
86pub use tree_copy::{copy_tree, copy_tree_keeping, files_under};