2 releases
0.1.1 | Feb 19, 2024 |
---|---|
0.1.0 | Feb 17, 2024 |
#1174 in Filesystem
45 downloads per month
Used in sentrum
24KB
270 lines
systemd-directories
A tiny library to retrieve systemd directories following systemd.exec(5).
This library targets Linux when systemd is used as the execution environment.
Examples
Standalone functions
use systemd_directories;
let runtime_dir = systemd_directories::runtime_dir();
println!("runtime directory: {:?}", runtime_dir);
SystemdDirs
Struct
use systemd_directories::SystemdDirs;
let dirs = SystemdDirs::new();
let runtime_dir = dirs.runtime_dir();
println!("runtime directory: {:?}", runtime_dir);