pub async fn sync( canister: &Canister<'_>, dir: &Path, timeout: Duration) -> Result<()>
Sets the contents of the asset canister to the contents of a directory, including deleting old assets.