Struct ar::Header
[−]
[src]
pub struct Header { /* fields omitted */ }
Representation of an archive entry header.
Methods
impl Header
[src]
fn new(identifier: Vec<u8>, size: u64) -> Header
[src]
Creates a header with the given file identifier and size, and all other fields set to zero.
fn from_metadata(identifier: Vec<u8>, meta: &Metadata) -> Header
[src]
Creates a header with the given file identifier and all other fields set from the given filesystem metadata.
fn identifier(&self) -> &[u8]
[src]
Returns the file identifier.
fn set_identifier(&mut self, identifier: Vec<u8>)
[src]
Sets the file identifier.
fn mtime(&self) -> u64
[src]
Returns the last modification time in Unix time format.
fn set_mtime(&mut self, mtime: u64)
[src]
Sets the last modification time in Unix time format.
fn uid(&self) -> u32
[src]
Returns the value of the owner's user ID field.
fn set_uid(&mut self, uid: u32)
[src]
Sets the value of the owner's user ID field.
fn gid(&self) -> u32
[src]
Returns the value of the group's user ID field.
fn set_gid(&mut self, gid: u32)
[src]
Returns the value of the group's user ID field.
fn mode(&self) -> u32
[src]
Returns the mode bits for this file.
fn set_mode(&mut self, mode: u32)
[src]
Sets the mode bits for this file.
fn size(&self) -> u64
[src]
Returns the length of the file, in bytes.
fn set_size(&mut self, size: u64)
[src]
Sets the length of the file, in bytes.