<trclass="memdesc:a1e5786e5762aaecbd270f9e26777f344"><tdclass="mdescLeft"> </td><tdclass="mdescRight">File number (unique within the partition). <br/></td></tr>
<trclass="memdesc:acef4f9b9acac33d1e5f08f6cd62afab3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Partition number containing this file. <br/></td></tr>
<trclass="memdesc:a8bc76d9c2d9c43e14680e39d3fc728ca"><tdclass="mdescLeft"> </td><tdclass="mdescRight">First block of the file (inclusive). <br/></td></tr>
<trclass="memdesc:a7cd5974b8f4d7bf691428d856be1e54b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Last block of the file (inclusive). <br/></td></tr>
<divclass="textblock"><p>Describes a single logical file on a tape medium. </p>
<p>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.</p>
<p><b>File Number:</b> 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.</p>
<p><b>Partition Association:</b> 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.</p>
<p><b>Block Range:</b> The FirstBlock and LastBlock fields define the inclusive range of blocks that comprise the file. Both endpoints are included in the file. For example:</p><ul>
<li>FirstBlock=0, LastBlock=0: A single-block file (block 0)</li>
<li>FirstBlock=10, LastBlock=19: A ten-block file (blocks 10-19 inclusive)</li>
<li>FirstBlock=100, LastBlock=99: Invalid (FirstBlock must be ≤ LastBlock)</li>
</ul>
<p><b>Physical Layout:</b> 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.</p>
<p><b>File Marks:</b> 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.</p>
<p><b>Size Calculation:</b> 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)</p>
<dlclass="section note"><dt>Note</dt><dd>File numbers and block addresses are format-specific. Some formats use 0-based numbering while others use 1-based. The Aaru format preserves the original numbering scheme.</dd>
<dd>
Files cannot span partitions. If a logical dataset crosses partition boundaries, it would be represented as separate files in each partition.</dd>
<dd>
Empty files (where FirstBlock == LastBlock but containing no data) may exist on some tape formats to serve as markers or placeholders. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="tape_8h_source.html#l00133">133</a> of file <aclass="el"href="tape_8h_source.html">tape.h</a>.</p>
<p>File number (unique within the partition). </p>
<p>Identifies this file among all files in the same partition. Numbering scheme is tape-format-dependent. </p>
<pclass="definition">Definition at line <aclass="el"href="tape_8h_source.html#l00135">135</a> of file <aclass="el"href="tape_8h_source.html">tape.h</a>.</p>
<p>This is the starting block address of the file data. Block addresses are 0-based within the partition. </p>
<pclass="definition">Definition at line <aclass="el"href="tape_8h_source.html#l00139">139</a> of file <aclass="el"href="tape_8h_source.html">tape.h</a>.</p>
<pclass="reference">Referenced by <aclass="el"href="tape_8c_source.html#l00571">aaruf_get_tape_file()</a>, and <aclass="el"href="tape_8c_source.html#l00772">aaruf_set_tape_file()</a>.</p>
<p>This is the ending block address of the file data. Must be ≥ FirstBlock. The file contains all blocks from FirstBlock through LastBlock inclusive. </p>
<pclass="definition">Definition at line <aclass="el"href="tape_8h_source.html#l00142">142</a> of file <aclass="el"href="tape_8h_source.html">tape.h</a>.</p>
<pclass="reference">Referenced by <aclass="el"href="tape_8c_source.html#l00571">aaruf_get_tape_file()</a>, and <aclass="el"href="tape_8c_source.html#l00772">aaruf_set_tape_file()</a>.</p>
<p>References a partition defined in the <aclass="el"href="structTapePartitionHeader.html"title="Header for a tape partition metadata block containing partition layout information.">TapePartitionHeader</a> block. Valid range: 0-255. </p>
<pclass="definition">Definition at line <aclass="el"href="tape_8h_source.html#l00137">137</a> of file <aclass="el"href="tape_8h_source.html">tape.h</a>.</p>
<liclass="footer">Generated by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.14.0 </li>