Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,11 @@
//! # use liboverdrop;
//! // Scan for fragments under:
//! // * /usr/lib/my-crate/config.d/*.toml
//! // * /run/my-crate/config.d/*.toml
//! // * /usr/local/lib/my-crate/config.d/*.toml
//! // * /etc/my-crate/config.d/*.toml
//! // * /run/my-crate/config.d/*.toml
//!
//! let base_dirs = [
//! "/usr/lib",
//! "/run",
//! "/etc",
//! ];
//! let fragments = liboverdrop::scan(&base_dirs, "my-crate/config.d", &["toml"], false);
//! let fragments = liboverdrop::scan(liboverdrop::SYSTEMD_CONVENTIONAL_BASES, "my-crate/config.d", &["toml"], false);
//!
//! for (filename, filepath) in fragments {
//! println!("fragment '{}' located at '{}'", filename.to_string_lossy(), filepath.display());
Expand Down Expand Up @@ -93,6 +89,7 @@ pub const SYSTEMD_CONVENTIONAL_BASES: &[&str] = &["/usr/lib", "/usr/local/lib",
/// # Arguments
///
/// * `base_dirs` - Base components of directories where configuration fragments are located.
/// System services will usually want [`SYSTEMD_CONVENTIONAL_BASES`] here.
/// * `shared_path` - Common relative path from each entry in `base_dirs` to the directory
/// holding configuration fragments.
/// * `allowed_extensions` - Only scan files that have an extension listed in `allowed_extensions`.
Expand Down