def extract( resources, output=".", debug=False, trusted=False, strip_components=0, force=False ): """ Extract resources. Args: resources (iterable of str): Resources URLs. output (path-like object): Output path. debug (bool): If True, show full error traceback and stop on first error. trusted (bool): If True, allow extraction of files outside of the output directory. Default to False, because this can be a security issue if extracted from an untrusted source. strip_components (int): strip NUMBER leading components from file path on extraction. force (bool): Replace any existing destination even if modified by user. """ with _Tsk( resources, "extract", output=output, debug=debug, force=force, trusted=trusted, strip_components=strip_components, ) as tsk: tsk.apply()
def remove(resources="*", debug=False): """ Remove resources. Args: resources (iterable of str): Resources URLs. debug (bool): If True, show full error traceback and stop on first error. """ with _Tsk(resources, "remove", debug=debug) as tsk: tsk.apply()
def update(resources="*", debug=False, force=False): """ Update resources. Args: resources (iterable of str): Resources URLs. debug (bool): If True, show full error traceback and stop on first error. force (bool): Replace any existing destination even if modified by user. """ with _Tsk(resources, "update", debug=debug, force=force) as tsk: tsk.apply()
def download(resources, output=".", debug=False, force=False): """ Download resources. Args: resources (iterable of str): Resources URLs. output (path-like object): Output path. debug (bool): If True, show full error traceback and stop on first error. force (bool): Replace any existing destination even if modified by user. """ with _Tsk(resources, "download", output=output, debug=debug, force=force) as tsk: tsk.apply()