Struct cab::FileBuilder [−][src]
pub struct FileBuilder { /* fields omitted */ }
A structure for building a file within a new cabinet.
Methods
impl FileBuilder
[src]
impl FileBuilder
pub fn set_datetime(&mut self, datetime: NaiveDateTime)
[src]
pub fn set_datetime(&mut self, datetime: NaiveDateTime)
Sets the datetime for this file. According to the CAB spec, this "is typically considered the 'last modified' time in local time, but the actual definition is application-defined".
The CAB file format only supports storing datetimes with years from 1980 to 2107 (inclusive), with a resolution of two seconds. If the given datetime is outside this range/resolution, it will be clamped/rounded to the nearest legal value.
By default, the datetime of a new FileBuilder
is the current local
date/time.
pub fn set_is_read_only(&mut self, is_read_only: bool)
[src]
pub fn set_is_read_only(&mut self, is_read_only: bool)
Sets whether this file has the "read-only" attribute set. This attribute is false by default.
Sets whether this file has the "hidden" attribute set. This attribute is false by default.
pub fn set_is_system(&mut self, is_system_file: bool)
[src]
pub fn set_is_system(&mut self, is_system_file: bool)
Sets whether this file has the "system file" attribute set. This attribute is false by default.
pub fn set_is_archive(&mut self, is_archive: bool)
[src]
pub fn set_is_archive(&mut self, is_archive: bool)
Sets whether this file has the "archive" (modified since last backup) attribute set. This attribute is true by default.
pub fn set_is_exec(&mut self, is_exec: bool)
[src]
pub fn set_is_exec(&mut self, is_exec: bool)
Returns true if this file has the "execute after extraction" attribute set. This attribute is false by default.
Auto Trait Implementations
impl Send for FileBuilder
impl Send for FileBuilder
impl Sync for FileBuilder
impl Sync for FileBuilder