Expand description
CoreVM FS that uses preimage store as a backend.
Files are stored as a series of blocks. A file begins with a main block that stores metadata
and the actual first block. A directory is stored as a file with NodeKind::Dir specified in
the main block. Maximum file size is around 504 GiB.
Structs§
- Block
Ref - Unique file block identifier in the file system.
- Dir
- A directory stored in the block storage.
- File
- A file stored in the block storage.
- File
Block - Single file block.
- File
Name - File name.
- Hash
- File block hash.
- Host
DirEntry - Host directory entry.
- Invalid
Block - Invalid file block.
- Invalid
Path - Path resolution error.
- IoError
- Input/output error.
- Main
Block - The main block that describes a file system node (either a file or a directory).
- Node
Iter - Recursively traverses file system nodes.
- Node
Reader - Reads a node (file or directory) from the block storage.
- Node
Writer - Write a node (file or directory) to the block storage.
Enums§
Constants§
- MAX_
BLOCK_ SIZE - Maximum file block size.
- MAX_
FILE_ NAME_ LEN - Maximum file name length in bytes.
- MIN_
BLOCK_ SIZE - Minimum file block size in bytes.
Traits§
- Host
DirRead - Host directory reader.
- Host
DirWrite - Host directory writer.
- Host
File Read - Host file reader.
- Host
File Write - Host file writer.
- Host
Write - Host writer.
- Read
Block - File block reader.
- Write
Block - File block writer.
Functions§
- copy_
dir_ in - Recurisvely copy the directory from the host file system to the block storage.
- copy_
dir_ out - Recursively copy the directory referenced by
main_block_reffrom the block storage to the host file system. - copy_
file_ in - Copy the file from the host file system to the block storage.
- copy_
file_ out - Copy the file referenced by
main_block_reffrom the block storage to the host file system. - copy_
out - Copy the file or directory (recursively) referenced by
main_block_reffrom the block storage to the host file system. - create_
dir - Create directory in the block storage.
- read
- Fully read the file referenced by
main_block_ref. - resolve_
path - Resolve
pathinto main block reference.