MCPcopy Create free account
hub / github.com/dtormoen/tsk-tsk / try_read_squid_conf

Function try_read_squid_conf

src/context/tsk_config.rs:562–573  ·  view source on GitHub ↗

Try to read a squid configuration file, warning on failure.

(path: &Path)

Source from the content-addressed store, hash-verified

560
561/// Try to read a squid configuration file, warning on failure.
562fn try_read_squid_conf(path: &Path) -> Option<String> {
563 match std::fs::read_to_string(path) {
564 Ok(content) => Some(content),
565 Err(e) => {
566 eprintln!(
567 "Warning: Failed to read squid_conf_path '{}': {e}",
568 path.display()
569 );
570 None
571 }
572 }
573}
574
575/// Expand leading `~` or `~/` in a path string to the user's home directory.
576fn expand_tilde(path: &str) -> PathBuf {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected