Expand description
Rust-native storage and content-analysis primitives for Dhara Storage.
This crate provides definition-driven file typing (bundled filedefs.dat),
path-based file and directory handles, transfers with optional progress, and
debounced directory watching. Framework primitives (DSFD encode/decode,
progress/cancel, portable value types) live in dhara_storage_core and are
re-exported here for the usual application dependency path. This crate embeds
and indexes the runtime filedefs.dat.
Re-exports§
pub use analysis::AnalysisReport;pub use analysis::ContentKind;pub use analysis::DetectedDefinition;pub use analysis::analyze_path;pub use analysis::analyze_reader;pub use definitions::DEFINITION_PACKAGE_ID;pub use definitions::bundled_definition_package;pub use definitions::decode_definition_package;pub use error::StorageError;pub use metadata::DEFAULT_SHELL_ICON_SIZE;pub use metadata::DirectoryMetadata;pub use metadata::DirectorySummary;pub use metadata::FileExtension;pub use metadata::FileMetadata;pub use metadata::ShellIcon;pub use metadata::StorageMetadata;pub use metadata::StorageType;pub use metadata::apply_storage_attributes;pub use metadata::is_temporary_path;pub use metadata::scan_directory_summary;pub use operations::ProcessOutcome;pub use operations::StorageProcess;pub use operations::copy_directory;pub use operations::copy_directory_with_options;pub use operations::copy_file;pub use operations::copy_file_with_options;pub use operations::create_directory;pub use operations::create_directory_all;pub use operations::delete_directory;pub use operations::delete_directory_with_options;pub use operations::delete_file;pub use operations::execute_copy_directory_with_options;pub use operations::execute_copy_file_with_options;pub use operations::execute_move_directory_with_options;pub use operations::execute_move_file_with_options;pub use operations::move_directory;pub use operations::move_directory_with_options;pub use operations::move_file;pub use operations::move_file_with_options;pub use operations::open_for_read;pub use operations::open_for_write;pub use operations::read_file;pub use operations::read_file_to_string;pub use operations::rename_directory;pub use operations::rename_file;pub use operations::start_copy_directory;pub use operations::start_copy_directory_with_options;pub use operations::start_copy_file;pub use operations::start_copy_file_with_options;pub use operations::start_move_directory;pub use operations::start_move_directory_with_options;pub use operations::start_move_file;pub use operations::start_move_file_with_options;pub use operations::write_file;pub use operations::write_file_from_reader;pub use operations::write_file_string;pub use storage::DirectoryStorage;pub use storage::FileStorage;pub use storage::SearchScope;pub use storage::StorageEntry;pub use watch::DirectoryWatchHandle;pub use watch::StorageChangeEvent;pub use watch::StorageChangeType;pub use watch::StorageWatchConfig;
Modules§
- analysis
- Content-based file analysis and heuristic classification helpers. Content-based file analysis against the bundled definition package.
- definitions
- Runtime file-definition package types and decoders. Runtime loading and decoding of the bundled file-definition database.
- error
- Typed error values returned by storage operations and metadata queries. Typed errors for analysis, metadata, and storage operations.
- metadata
- On-demand metadata, attributes, permissions, and size helpers. On-demand storage metadata, attributes, permissions, and size helpers.
- operations
- File and directory mutation APIs (progress/cancel types from core, re-exported). Free functions for file and directory create/copy/move/delete with progress options.
- process
- Awaitable storage process handle for in-flight copy/move work.
Public awaitable
StorageProcesshandle for in-flight storage work. - storage
- Path-based storage handles layered over the core operation APIs.
Path-based
FileStorageandDirectoryStoragehandles. - watch
- Debounced directory watching primitives. Debounced directory watching and change-event types.
Structs§
- Definition
Package - Serialized file-definition package loaded from
filedefs.dat. - Definition
Record - Single normalized file-type definition record.
- Directory
Delete Options - Options for directory deletion.
- Open
Read Options - Options for engine/interop read opens.
- Open
Write Options - Options for engine/interop write opens.
- Read
Options - Common options for byte-oriented read operations.
- Signature
Definition - Signature material used to identify a file type from file bytes.
- Signature
Pattern - Byte sequence that should match at a specific offset within a file.
- Storage
Attributes - Settable storage attributes shared by files and directories.
- Storage
Cancellation Token - Cooperative cancellation token for long-running storage operations.
- Storage
Permissions - Best-effort effective permissions for the current process.
- Storage
Size - On-demand storage size: raw OS bytes plus a readable label.
- Transfer
Options - Common options for copy and move style operations.
- Write
Options - Common options for file write operations.
Enums§
- Definition
Package Decode Error - Errors returned while encoding or decoding definition packages.
- File
Share Mode - How other processes may share an opened file (Windows share mode; Unix ignores exclusivity nuances where N/A).
- Size
Unit - Units used for formatting byte sizes.
- Storage
Process Event - Event emitted by a process session / public storage process during long-running work.
Traits§
- Process
Event Reporter - Receives process events from an in-flight transfer session.
Functions§
- format_
size - Formats a byte count using either the requested unit or an automatically selected one.
Type Aliases§
- Shared
Process Event Reporter - Shared reporter type used by sync APIs and daemon/FFI bridges.