Crate stowr_core

Crate stowr_core 

Source
Expand description

§Stowr Core

A Rust library for file management with compression, storage, and indexing capabilities.

§Quick Start

use stowr_core::{Config, StorageManager, create_index};
use std::path::Path;
 
let config = Config::default();
let index = create_index(&config)?;
let mut storage = StorageManager::new(config, index);
 
// Store a file
// storage.store_file(Path::new("example.txt"), false)?;
 
// List files
let files = storage.list_files()?;
println!("Stored {} files", files.len());

§Features

  • File compression using gzip
  • Dual indexing system (JSON/SQLite)
  • Batch operations with glob patterns
  • Multi-threaded processing
  • Configurable compression levels

§Integration

This library can be easily integrated into:

  • Command-line applications
  • Desktop applications (e.g., Tauri)
  • Web services
  • System utilities

Re-exports§

pub use config::Config;
pub use config::IndexMode;
pub use config::CompressionAlgorithm;
pub use config::DeltaAlgorithm;
pub use storage::StorageManager;
pub use index::FileEntry;
pub use index::IndexStore;
pub use index::create_index;
pub use dedup::ContentDeduplicator;
pub use dedup::DedupInfo;
pub use dedup::DedupStats;
pub use delta::DeltaStorage;
pub use delta::DeltaInfo;
pub use delta::SimilarityMatch;
pub use delta::DeltaStats;

Modules§

config
dedup
delta
index
storage

Structs§

Path
A slice of a path (akin to str).
PathBuf
An owned, mutable path (akin to String).

Type Aliases§

Result
Result<T, Error>