Module fs

Module fs 

Source
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§

BlockRef
Unique file block identifier in the file system.
Dir
A directory stored in the block storage.
File
A file stored in the block storage.
FileBlock
Single file block.
FileName
File name.
Hash
File block hash.
HostDirEntry
Host directory entry.
InvalidBlock
Invalid file block.
InvalidPath
Path resolution error.
IoError
Input/output error.
MainBlock
The main block that describes a file system node (either a file or a directory).
NodeIter
Recursively traverses file system nodes.
NodeReader
Reads a node (file or directory) from the block storage.
NodeWriter
Write a node (file or directory) to the block storage.

Enums§

Error
Generic file system error.
Node
File system node.
NodeKind
File system node type.

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§

HostDirRead
Host directory reader.
HostDirWrite
Host directory writer.
HostFileRead
Host file reader.
HostFileWrite
Host file writer.
HostWrite
Host writer.
ReadBlock
File block reader.
WriteBlock
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_ref from 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_ref from the block storage to the host file system.
copy_out
Copy the file or directory (recursively) referenced by main_block_ref from 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 path into main block reference.