bool ProfileFileHasPassword(Path path) { ProfileMap map; return Profile::LoadFile(map, path, IgnoreError()) && map.Exists(ProfileKeys::Password); }
TriState ProfileFileHasPassword(Path path) { ProfileMap map; try { Profile::LoadFile(map, path); } catch (const std::runtime_error &) { return TriState::UNKNOWN; } return map.Exists(ProfileKeys::Password) ? TriState::TRUE : TriState::FALSE; }