Skip to main content

Directory

Struct Directory 

Source
pub struct Directory {
Show 19 fields pub version: u8, pub unknown1: u8, pub header_len: u16, pub unknown2: u8, pub flags: EntryFlags, pub creation_date: DateTime<Utc>, pub modification_date: DateTime<Utc>, pub previous_entry_offset: u32, pub next_entry_offset: u32, pub directory_entry_offset: u32, pub file_name_len: u16, pub header_crc: u16, pub data_uncompressed_len: u32, pub data_compressed_len: u32, pub data_crc: u16, pub unknown3: u16, pub child_count: u32, pub real_dir: Option<RealDirectory>, pub first_child_offset: u64,
}
Expand description

A directory entry in v5 archives

Fields§

§version: u8§unknown1: u8§header_len: u16§unknown2: u8§flags: EntryFlags§creation_date: DateTime<Utc>§modification_date: DateTime<Utc>§previous_entry_offset: u32

Offset of previous entry on the same level

§next_entry_offset: u32

Offset of next entry on the same level

§directory_entry_offset: u32

Offset to parent directory entry

§file_name_len: u16§header_crc: u16§data_uncompressed_len: u32§data_compressed_len: u32§data_crc: u16§unknown3: u16§child_count: u32§real_dir: Option<RealDirectory>§first_child_offset: u64

Implementations§

Source§

impl Directory

Source

pub fn finder_flags(&self) -> FinderFlags

Source

pub fn comment(&self) -> &str

Source

pub fn file_name(&self) -> &str

Source

pub fn file_code(&self) -> FourCC

Source

pub fn creator_code(&self) -> FourCC

Source

pub fn checksum(&self, fork: Fork) -> u16

Source

pub fn compressed_size(&self, fork: Fork) -> usize

Source

pub fn uncompressed_size(&self, fork: Fork) -> usize

Source

pub fn algorithm(&self, fork: Fork) -> Algorithm

Source

pub fn offset(&self, fork: Fork) -> u64

Source

pub fn uses_encryption(&self) -> bool

Trait Implementations§

Source§

impl BinRead for Directory

Source§

type Args<'__binrw_generated_args_lifetime> = DirectoryBinReadArgs

The type used for the args parameter of read_args() and read_options(). Read more
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>

Read Self from the reader using the given Endian and arguments. Read more
Source§

fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek, Self: ReadEndian,

Read Self from the reader using the given arguments. Read more
Source§

fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read Self from the reader, assuming big-endian byte order, using the given arguments. Read more
Source§

fn read_le_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read Self from the reader, assuming little-endian byte order, using the given arguments. Read more
Source§

fn read_ne_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read T from the reader, assuming native-endian byte order, using the given arguments. Read more
Source§

impl Clone for Directory

Source§

fn clone(&self) -> Directory

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Directory

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Directory> for Directory

Source§

fn from(value: Directory) -> Self

Converts to this type from the input type.
Source§

impl ReadEndian for Directory

Source§

const ENDIAN: EndianKind

The endianness of the type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.