pub struct SqpackFile {
pub main_id: u16,
pub sub_id: u16,
pub file_id: u32,
}Expand description
Identifier of a SqPack file targeted by a SQPK command.
SqPack files live under
<game_root>/sqpack/<expansion>/<main_id:02x><sub_id:04x>.<platform>.<kind>.
The three fields together uniquely address one file on disk; see the
apply::path module for how they are combined into filesystem paths.
Fields§
§main_id: u16Category/repository identifier — the first two hex digits of the filename
stem (e.g. 04 in 040100.win32.dat0).
Encoded as a big-endian u16 (2 bytes) in the wire format.
sub_id: u16Sub-category identifier — the next four hex digits of the filename stem
(e.g. 0100 in 040100.win32.dat0).
Encoded as a big-endian u16 (2 bytes). The high byte (sub_id >> 8)
selects the expansion folder: 0 → ffxiv, 1 → ex1, 2 → ex2, etc.
file_id: u32File index within the category, used to derive the numeric suffix:
- For
.datfiles: appended directly as the decimalNin.datN. - For
.indexfiles:0produces no suffix (.index);1or higher appends the value directly (.index1,.index2, …).
Encoded as a big-endian u32 (4 bytes).
Trait Implementations§
Source§impl BinRead for SqpackFile
impl BinRead for SqpackFile
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments. Read moreSource§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
T from the reader assuming native-endian byte order. Read moreSource§fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader using the given arguments. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl Clone for SqpackFile
impl Clone for SqpackFile
Source§fn clone(&self) -> SqpackFile
fn clone(&self) -> SqpackFile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SqpackFile
impl Debug for SqpackFile
Source§impl Hash for SqpackFile
impl Hash for SqpackFile
Source§impl PartialEq for SqpackFile
impl PartialEq for SqpackFile
Source§fn eq(&self, other: &SqpackFile) -> bool
fn eq(&self, other: &SqpackFile) -> bool
self and other values to be equal, and is used by ==.