#systemd #directories

systemd-directories

A tiny library to retrieve systemd directories following systemd.exec(5)

2 releases

0.1.1 Feb 19, 2024
0.1.0 Feb 17, 2024

#1161 in Filesystem


Used in sentrum

MIT license

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.

Crates.io Version Crates.io Documentation CI Crates.io Downloads

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);

No runtime deps