pub fn create_default_output_path(input: &Path) -> PathBufExpand description
Creates a default output path by appending _synced to the file stem.
§Arguments
input- The input subtitle path
§Returns
The input path with its file name replaced by <stem>_synced.<extension>,
or the input path unchanged when it has no file stem or no extension.
§Examples
use std::path::PathBuf;
use subx_core::core::sync::create_default_output_path;
assert_eq!(
create_default_output_path(&PathBuf::from("subs/movie.srt")),
PathBuf::from("subs/movie_synced.srt")
);
assert_eq!(
create_default_output_path(&PathBuf::from("noextension")),
PathBuf::from("noextension")
);