pub fn set_default(mime: &str, app: &str) -> Result<()>Expand description
Makes app the default for mime, in the user’s own
mimeapps.list.
Prefer MimeDb::set_default, which resolves an alias first. This
one writes the name it is given, so a caller passing an alias
records a line nothing will ever read back.
Writes exactly one line of that file and copies the rest through —
see defaults’s own doc. The write is atomic, so an interrupted
save cannot leave a half-written associations file behind.