Function tml::expand_destination
[−]
[src]
pub fn expand_destination<'a, S: ?Sized, D: ?Sized>(
src: &'a S,
dst: &'a D
) -> Result<Cow<'a, Path>> where
S: AsRef<Path>,
D: AsRef<Path>,
Expand dst based on src.
dst will be expanded according to the following rules.
Rules
- The file_name of src will be returned if dst is empty.
- The file_name of src will be appended to dst and then returned if dst ends with /.
- Otherwise dst will be returned.