[][src]Function librapidarchive::tar::canonicalized_tar_path

pub fn canonicalized_tar_path(dirpath: &Path, filetype: TarFileType) -> String

Given a filesystem path and the file's type, canonicalize the path for tar archival.

If the given filetype indicates a directory, then the path will be suffixed by a path separator.

Compatibility Note

The canonicalized_tar_path function was written specifically to match the quirks of GNU tar, especially it's behavior of transforming Windows paths into UNIX-looking equivalents. (e.g. C:\test.txt becomes c\test.txt)