aoc-toolkit 0.1.0-alpha.3

A toolkit for solving Advent of Code problems
Documentation
1
2
3
4
5
6
7
8
9
10
use std::io;
use std::path::PathBuf;

pub(crate) fn native_hosts_dir() -> io::Result<PathBuf> {
    let home = std::env::var_os("HOME")
        .filter(|value| !value.is_empty())
        .ok_or_else(|| io::Error::new(io::ErrorKind::NotFound, "Home directory unavailable"))?;

    Ok(PathBuf::from(home).join("Library/Application Support/Google/Chrome/NativeMessagingHosts"))
}