pub struct Options {
pub no_create: bool,
pub no_deref: bool,
pub source: Source,
pub date: Option<String>,
pub change_times: ChangeTimes,
pub strict: bool,
}Expand description
Options contains all the possible behaviors and flags for touch.
All options are public so that the options can be programmatically constructed by other crates, such as nushell. That means that this struct is part of our public API. It should therefore not be changed without good reason.
The fields are documented with the arguments that determine their value.
Fields§
§no_create: boolDo not create any files. Set by -c/--no-create.
no_deref: boolAffect each symbolic link instead of any referenced file. Set by -h/--no-dereference.
source: SourceWhere to get access and modification times from
date: Option<String>If given, uses time from source but on given date
change_times: ChangeTimesWhether to change access time only, modification time only, or both
strict: boolWhen true, error when file doesn’t exist and either --no-dereference
was passed or the file couldn’t be created