Struct ar::Header
[−]
[src]
pub struct Header { /* fields omitted */ }
Representation of an archive entry header.
Methods
impl Header
[src]
pub 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.
pub 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.
pub fn identifier(&self) -> &[u8]
[src]
Returns the file identifier.
pub fn set_identifier(&mut self, identifier: Vec<u8>)
[src]
Sets the file identifier.
pub fn mtime(&self) -> u64
[src]
Returns the last modification time in Unix time format.
pub fn set_mtime(&mut self, mtime: u64)
[src]
Sets the last modification time in Unix time format.
pub fn uid(&self) -> u32
[src]
Returns the value of the owner's user ID field.
pub fn set_uid(&mut self, uid: u32)
[src]
Sets the value of the owner's user ID field.
pub fn gid(&self) -> u32
[src]
Returns the value of the group's user ID field.
pub fn set_gid(&mut self, gid: u32)
[src]
Returns the value of the group's user ID field.
pub fn mode(&self) -> u32
[src]
Returns the mode bits for this file.
pub fn set_mode(&mut self, mode: u32)
[src]
Sets the mode bits for this file.
pub fn size(&self) -> u64
[src]
Returns the length of the file, in bytes.
pub fn set_size(&mut self, size: u64)
[src]
Sets the length of the file, in bytes.