Skip to main content

Crate rskit_storage

Crate rskit_storage 

Source
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§

FileMeta
Metadata about a file.
FileWriter
Handle for writing output. Finalize to get the resulting FileSource.
ResolvedPath
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.
TempFile
Managed temporary file. Deleted when the inner handle is dropped.

Enums§

FileKind
Broad file category for routing to the right processor.
FileSink
Destination for file output.
FileSource
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.