Expand description
File I/O, storage backends, temp files, and MIME detection.
rskit-storage provides generic file operations for any file type: read, write, copy, stream,
detect type, manage temp files, and store through the FileStore trait.
Re-exports§
pub use store::DEFAULT_CONTENT_TYPE;pub use store::FileStore;pub use store::LocalStore;pub use store::LocalStoreConfig;pub use store::ProgressCallback;pub use store::StorageConfig;pub use store::StorageFactory;pub use store::StorageRegistry;pub use store::StoredFile;pub use store::UploadOptions;pub use store::UploadProgress;pub use store::content_type_or_default;pub use store::prefixed_key;pub use store::register_local;
Modules§
- store
- Storage backends for file persistence. File store trait and backends for persistent file storage.
Structs§
- File
Meta - Metadata about a file.
- File
Writer - Handle for writing output. Finalize to get the resulting
FileSource. - Resolved
Path - A local path that may be backed by a temp file. The temp file (if any) is kept alive as long as this struct exists.
- TempDir
- Managed temporary directory. All contents are cleaned up on drop.
- Temp
File - Managed temporary file. Deleted when the inner handle is dropped.
Enums§
- File
Kind - Broad file category for routing to the right processor.
- File
Sink - Destination for file output.
- File
Source - A reference to file content that can be read. Does NOT load content eagerly — all reads are lazy/streamed.
Functions§
- copy_
file - Copy a file from source to sink, optionally reporting progress.
- detect_
kind - Detect the broad file kind of a source.
- detect_
mime - Detect the MIME type of a file source.
- file_
meta - Extract full metadata from a file source.
- transfer
- Transfer a file between two stores.