Crate srfs_core

Source
Expand description

Simple Rust File System (core library)

A simple filesystem impremented in Rust [no_std].

This crate is a work-in-progress. It contains low-level code to work directly with block devices (see trait SyncBlockDevice).

Higher-level API, dependent on [std], lives in crate srfs.

All basic filesystem features are implemented (see struct SyncFileSystem), with provisions for extensions.

At the moment only synchronous interface is provided. See src/tests.rs for usage examples.

TODO:

  • crash recovery
  • timestamps
  • async API

Contributions are welcome.

Structs§

Attr
DirEntry
EntryId
SyncFileSystem
Timestamp

Enums§

EntryKind
FsError

Constants§

BLOCK_SIZE
MAX_DIR_ENTRIES
MAX_FILE_SIZE
PARTITION_ID
See https://en.wikipedia.org/wiki/Partition_type. We use an arbitrary unused number here.
ROOT_DIR_ID

Traits§

SyncBlockDevice
Synchronous Block Device.

Functions§

format
Initializes the block device so that it has an SFFS with a single/empty root dir.