pub fn read_pretty_name(mount_point: &Path) -> Option<String>Expand description
Best-effort “friendly” distro name for a mounted ISO.
Reads the first file in this priority order and returns the first useful value found:
/etc/os-releasePRETTY_NAME— systemd convention; all modern distros ship this (Ubuntu, Fedora, Rocky, Alma, Debian 12+, openSUSE, Arch,NixOS22+, Alpine 3.17+)./lib/os-releasePRETTY_NAME— symlink target on some distros; handled independently in case the/etccopy is missing./.disk/info— single line of free text, Ubuntu + Debian live/install media tradition since circa Debian 6. Form: “Ubuntu 24.04.2 LTS …”./etc/alpine-release— single version string (e.g. “3.20.3”) on Alpine. We prepend “Alpine “ so the returned value is self-contained.
Returns None if none of the paths exist or all attempts produce an
empty string. This is advisory — every caller must tolerate None
and fall back to the Distribution-family label.