Skip to content

spaceandtimelabs/file-manager

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

file-manager

A set of traits that abstract file interactions to enable better testability and flexibility.

This crate allows Rust developers to write code that typically operates on files, but can instead operate against another data structure. For example, this crate offers two implementations:

  • StdFileManager: A FileManager implementation powered by std::fs.
  • MemoryFileManager: A FileManager implementation that is powered fully by in-memory structures.

This common abstraction layer is being adopted into OkayWAL, Sediment, Nebari, and eventually BonsaiDb, allowing the entire stack to support both file-based and in-memory databases.

Future goals

  • Ability to simulate IO errors with MemoryFileManager
    • Maximum space limit to simulate disk full errors
    • Bad regions: allow blocking reads and/or writes to specific regions of files.
  • Add support for fcntl(F_FBARRIERFSYNC).
  • Unify directory syncing logic between Sediment and OkayWAL.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%