pub struct DaemonPaths { /* private fields */ }Expand description
How the daemon classifies paths: the SDK’s patterns, its own config and env files (fixed at startup), and any env file its environment names.
The default protects no daemon files; only tests use it.
Implementations§
Source§impl DaemonPaths
impl DaemonPaths
Sourcepub fn new(protected: Vec<PathBuf>) -> Self
pub fn new(protected: Vec<PathBuf>) -> Self
protected holds the daemon’s own config and env files. They change
only through manage_config, never through the file tools.
Sourcepub fn is_secret(&self, path: &Path) -> bool
pub fn is_secret(&self, path: &Path) -> bool
True for files that hold secrets (keys, credentials, env files, the
daemon’s own config). Used by read_file.
Sourcepub fn is_secret_ignoring_name_shape(&self, path: &Path) -> bool
pub fn is_secret_ignoring_name_shape(&self, path: &Path) -> bool
Like DaemonPaths::is_secret but without the .env.* / *.key
name-shape rules, so a template file is judged by where it lives alone.
Sourcepub fn is_sensitive(&self, path: &Path) -> bool
pub fn is_sensitive(&self, path: &Path) -> bool
True for paths the file tools must not write.
Sourcepub fn is_own_file(&self, path: &Path) -> bool
pub fn is_own_file(&self, path: &Path) -> bool
True for the daemon’s own config and env files given at startup.
Sourcepub fn is_persistence(&self, path: &Path) -> bool
pub fn is_persistence(&self, path: &Path) -> bool
True for a path whose content runs or is obeyed later without
anyone asking (is_persistence_path), the daemon’s own folders
being where its config files live.