Skip to main content

check_destination

Function check_destination 

Source
pub fn check_destination(
    dest: &Path,
    name: &str,
    folder: bool,
    overwrite: bool,
    platform: Platform,
) -> Result<PathBuf, String>
Expand description

Tells before any data is sent whether a root named name can land at dest.

Applies the same rules as unpack does with the first entry, and returns the final path.

ยงErrors

Refuses with a message naming the path that is in the way, or the name that cannot exist here.