Crate tbf

Source
Expand description

The TBF, short for ‘tag-based filesystem’, is a new way of storing files.

Optimized for human recall and easy searching, tag-based storage reduces the need for complex storage trees. Instead, every file has a unique machine ID, as well as various tagged metadata, which can be used to find any set of files at any time.

The overall storage system works like this:

  • Files are added to the network, and automatically assigned various metadata tags
  • The user is free to add new tags, which may be part of a tag ‘group’
  • Alternatively, the user can use a unique ID to access a file

The system is defined as a trait, with various implementations able to use their own backing implementations. This could be an existing standard filesystem, a SQL database, or just in-memory maps.

Re-exports§

pub use error::Error;
pub use error::ErrorKind;

Modules§

error

Structs§

DirectoryBackedFs
A directory-backed implementation of a tag-based filesystem. Given a directory on a standard filesystem, will persist all data there.
FileId
Represents the ID of a file. Most numbers simply represent a unique file, however, the values 0-255 are reserved for special usage.
FileInfo
Combined info about a file
InMemoryFs
An in-memory implementation of a tag-based filesystem. This implementation will store all data in program memory, only persisting it for the duration of the program runtime.
Tag
A file tag, with a name and optionally a tag group

Enums§

DfsError
Error for a directory-backed filesystem
Group
The group associated with a tag. Many tags will be part of the ‘default’ group, but there can be any number of custom groups.
ImfsError
Error for an in-memory filesystem
TagPredicate
Complex support for matching binary expressions against tags

Traits§

FileSystem
A trait representing an implementation of a tag-based filesystem.
TagPattern
Any type that can be used to match a file’s tags on