Skip to main content

append_timestamp

Function append_timestamp 

Source
pub fn append_timestamp(path: &Utf8Path, ts: &str) -> Utf8PathBuf
Expand description

Append a timestamp before the extension.

  foo/bar.yml     + ts → foo/bar_<ts>.yml
  foo/bar         + ts → foo/bar_<ts>
  foo/.gitconfig  + ts → foo/.gitconfig_<ts>      (treat dotfiles as stem-only)