TPFS-0.1: Tagged plain file system in which a file can only have multiple tags and nothing more.

System.TPFS.Header

Synopsis

Documentation

data Header Source

A TPFS filesystem header, which is located at offset 0 in any filesystem, and is of length headerSize bytes.

Constructors

Header 

Fields

fileOffset :: Address

The address of the beginning of the file indexing table.

maxFiles :: Word64

The maximum number of files supported.

tagOffset :: Address

The address of the beginning of the tag indexing table.

maxTags :: Word64

The maximum number of tags supported.

superBlockMap :: Address

The address to the superblock-level bitmap.

blockMap :: Address

The address to the block-level bitmap.

blockOffset :: Address

The beginning of the block space.

blockSize :: Word64

The size of each block. Actual block content is blockSize hdr - 16 due to the pointer at the end of a block.

maxBlocks :: Word64

Block capacity of the file system.

Instances

Eq Header 
Ord Header 
Read Header 
Show Header 
Binary Header

The calculated size of a header in bytes. It is constant for any header.

getHeader :: Device m h => h -> m HeaderSource

Loads the filesystem header from a device.

putHeader :: Device m h => h -> Header -> m ()Source

Writes a filesystem header to the device.