steady-fs 0.1.0

Small, boring, reliable filesystem helpers for Rust CLI tools and developer apps.
Documentation
1
2
3
4
5
6
7
use std::path::{Path, PathBuf};

pub(crate) fn backup_path_for(path: &Path, suffix: &str) -> PathBuf {
    let mut os = path.as_os_str().to_os_string();
    os.push(suffix);
    PathBuf::from(os)
}