Struct cab::FileBuilder
[−]
[src]
pub struct FileBuilder { /* fields omitted */ }
A structure for building a file within a new cabinet.
Methods
impl FileBuilder
[src]
fn set_datetime(&mut self, datetime: NaiveDateTime)
[src]
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.
fn set_is_read_only(&mut self, is_read_only: bool)
[src]
Sets whether this file has the "read-only" attribute set. This attribute is false by default.
[src]
Sets whether this file has the "hidden" attribute set. This attribute is false by default.
fn set_is_system(&mut self, is_system_file: bool)
[src]
Sets whether this file has the "system file" attribute set. This attribute is false by default.
fn set_is_archive(&mut self, is_archive: bool)
[src]
Sets whether this file has the "archive" (modified since last backup) attribute set. This attribute is true by default.
fn set_is_exec(&mut self, is_exec: bool)
[src]
Returns true if this file has the "execute after extraction" attribute set. This attribute is false by default.