Skip to main content

FileHeader

Struct FileHeader 

Source
pub struct FileHeader {
    pub filename: PathBuf,
    pub unpacked_size: u64,
    pub file_crc: u32,
    pub file_time: u32,
    pub method: u32,
    pub file_attr: u32,
    /* private fields */
}
Expand description

Metadata for an entry in a RAR archive

Created using the read_header methods in an OpenArchive, contains information for the file that follows which is to be processed next.

Fields§

§filename: PathBuf§unpacked_size: u64§file_crc: u32§file_time: u32§method: u32§file_attr: u32

Implementations§

Source§

impl FileHeader

Source

pub fn is_split(&self) -> bool

is this entry split across multiple volumes.

Will also work in open mode List

Source

pub fn is_split_after(&self) -> bool

is this entry split across multiple volumes, starting here

Will also work in open mode List

Source

pub fn is_split_before(&self) -> bool

is this entry split across multiple volumes, starting here

Will always return false in open mode List1.


  1. this claim is not proven, however, the DLL seems to always skip files where this flag would have been set. 

Source

pub fn is_directory(&self) -> bool

is this entry a directory

Source

pub fn is_encrypted(&self) -> bool

is this entry encrypted

Source

pub fn is_file(&self) -> bool

is this entry a file

Trait Implementations§

Source§

impl Debug for FileHeader

Source§

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

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

impl Display for FileHeader

Source§

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

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

impl From<HeaderDataEx> for FileHeader

Source§

fn from(header: HeaderDataEx) -> Self

Converts to this type from the input 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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.