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_lock;
15mod file_reader;
16mod flush_batch;
17mod folder_copy;
18mod layout;
19mod local_bytes;
20mod lock;
21mod lock_registry;
22mod observed_file;
23#[cfg(any(test, feature = "test-utils"))]
24mod open_files;
25mod path_bytes;
26#[cfg(target_vendor = "apple")]
27mod protection;
28#[cfg(not(target_vendor = "apple"))]
29#[path = "protection_elsewhere.rs"]
30mod protection;
31#[cfg(any(test, feature = "test-utils"))]
32mod reached;
33mod relative_path;
34mod replacement;
35mod settings;
36#[cfg(any(test, feature = "test-utils"))]
37mod tree_copy;
38
39#[cfg(any(test, feature = "test-utils"))]
40pub use atomic_file::read_existing;
41pub use atomic_file::{replace as write_atomic, AtomicFile, FileError, FileWriter, WriterFolder};
42pub use bootstrap::{BootstrapDirectoryError, BootstrapStore};
43pub use creation::DirectoryCreationError;
44pub use deletion::IfUnsent;
45pub use device_reset::{DeviceReset, ReplacedBy, ReplacementPhase, ReplacementRecord};
46#[cfg(any(test, feature = "test-utils"))]
47pub use directory::StoreLockProbe;
48pub use directory::{
49    settle_files, verify_lock, FileArea, FileName, FileNameError, StagedName, StagingFolderError,
50    StoreDir, StoreDirAccess, StoreFile, TemporaryFolder, WriterError,
51};
52pub use file_lock::{FileLock, LockMode};
53pub use file_reader::FileReader;
54#[cfg(any(test, feature = "test-utils"))]
55pub use flush_batch::FlushHook;
56pub use flush_batch::{FlushBatch, Flushed};
57pub use folder_copy::{CopyFolder, CopyPathError, CopyPlan, CopyWriter, MadeFolder, RecordedCopy};
58pub use layout::StoreDirectories;
59pub use local_bytes::DirectoryBytes;
60#[cfg(any(test, feature = "test-utils"))]
61pub use lock::{bootstrap_lock, cache_writes_lock, writer_lock};
62pub use lock::{
63    CacheWriteLock, ClosedStoreLock, StoreClosingGuard, StoreDeletionLock, StoreLock,
64    StoreLockError, StoreReadLock,
65};
66pub use observed_file::{ObservationError, ObservedFile, UserOriginal};
67#[cfg(any(test, feature = "test-utils"))]
68pub use open_files::{assert_no_open_files_under, open_files_under};
69pub use path_bytes::{path_bytes, path_bytes_text, path_from_bytes, path_text, PathBytesError};
70#[cfg(target_vendor = "apple")]
71pub use protection::FileProtection;
72#[cfg(all(target_vendor = "apple", any(test, feature = "test-utils")))]
73pub use protection::ProtectionSupport;
74#[cfg(any(test, feature = "test-utils"))]
75pub use reached::when_reached;
76pub use relative_path::{windows_device, RelativePath, RelativePathError};
77pub use replacement::ReplacementStore;
78pub use settings::{SettingsError, StoreSettings};
79#[cfg(any(test, feature = "test-utils"))]
80pub use tree_copy::{copy_tree, copy_tree_keeping};