Function pdfshrink::pdf_into_subdir [−][src]
pub fn pdf_into_subdir<P, Q>(inpath: P, subdir: Q) -> Option<PathBuf> where
P: AsRef<Path>,
Q: AsRef<Path>,
Moves the file inpath
into the subdirectory subdir
.
If there is no extension, or the extension is not .pdf
, returns None
.
Examples
let before = "some dir/name.pdf"; let after = "some dir/subdir/name.pdf"; assert_eq!(pdf_into_subdir(before, "subdir"), Some(after.into()));