|
libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
|
Describes a single logical file on a tape medium. More...
#include <aaruformat/structs/tape.h>
Data Fields | |
| uint32_t | File |
| File number (unique within the partition). | |
| uint8_t | Partition |
| Partition number containing this file. | |
| uint64_t | FirstBlock |
| First block of the file (inclusive). | |
| uint64_t | LastBlock |
| Last block of the file (inclusive). | |
Describes a single logical file on a tape medium.
A tape file is a contiguous sequence of blocks that represents a discrete logical unit of data. Files are the primary organizational unit on tape media, analogous to files on a filesystem but simpler in structure. Each file is identified by a file number and exists within a specific partition.
File Number: The file number uniquely identifies the file within its partition. File numbering typically starts from 0 or 1 depending on the tape format. Sequential files are numbered consecutively, though gaps may exist if files were deleted or the tape was formatted with specific file positions reserved.
Partition Association: Each file belongs to exactly one partition. Multi-partition tapes can have files with the same file number in different partitions - the combination of partition number and file number uniquely identifies a file on the tape.
Block Range: The FirstBlock and LastBlock fields define the inclusive range of blocks that comprise the file. Both endpoints are included in the file. For example:
Physical Layout: Files occupy contiguous blocks on tape. There are no block pointers or allocation tables as found in disk filesystems. The physical ordering matches the logical ordering defined by the block range.
File Marks: On physical tape, files are typically separated by filemarks (also called tape marks). This structure represents the logical file boundaries; the actual filemarks may be implicit in the block numbering or explicitly stored in the tape data stream.
Size Calculation: File size in blocks = (LastBlock - FirstBlock + 1) File size in bytes = file_size_in_blocks × block_size (where block_size is tape-format-specific, commonly 512, 1024, or variable)
| uint32_t TapeFileEntry::File |
File number (unique within the partition).
Identifies this file among all files in the same partition. Numbering scheme is tape-format-dependent.
Definition at line 135 of file tape.h.
Referenced by aaruf_set_tape_file().
| uint64_t TapeFileEntry::FirstBlock |
First block of the file (inclusive).
This is the starting block address of the file data. Block addresses are 0-based within the partition.
Definition at line 139 of file tape.h.
Referenced by aaruf_get_tape_file(), and aaruf_set_tape_file().
| uint64_t TapeFileEntry::LastBlock |
Last block of the file (inclusive).
This is the ending block address of the file data. Must be ≥ FirstBlock. The file contains all blocks from FirstBlock through LastBlock inclusive.
Definition at line 142 of file tape.h.
Referenced by aaruf_get_tape_file(), and aaruf_set_tape_file().
| uint8_t TapeFileEntry::Partition |
Partition number containing this file.
References a partition defined in the TapePartitionHeader block. Valid range: 0-255.
Definition at line 137 of file tape.h.
Referenced by aaruf_set_tape_file().