accessmod/utils.py
def unzip_all(src_dir, dst_dir: str = None, remove_archive: bool = False) -> str:
    """Unzip all zip archives in a directory.

    Parameters
    ----------
    src_dir : str
        Source directory containing the zip archives.
    dst_dir : str, optional
        Target directory where archives are extracted to.
        Equals to source directory by default.

    Return
    ------
    list of str
        List of extracted files.
    """
    if not dst_dir:
        dst_dir = src_dir

    filenames = []
    for fn in os.listdir(src_dir):
        if fn.lower().endswith(".zip"):
            fp = os.path.join(src_dir, fn)
            filenames.append(unzip(fp, dst_dir))

    return _flatten(filenames)
Unzip all zip archives in a directory.

    Parameters
    ----------
    src_dir : str
        Source directory containing the zip archives.
    dst_dir : str, optional
        Target directory where archives are extracted to.
        Equals to source directory by default.

    Return
    ------
    list of str
        List of extracted files.
    
Unzip all zip archives in a directory.
Parameters

src_dir : str
Source directory containing the zip archives.
dst_dir : str, optional
Target directory where archives are extracted to.
Equals to source directory by default.

Return

list of str
List of extracted files.
Unzip all zip archives in a directory . Parameters src_dir : str Source directory containing the zip archives . dst_dir : str optional Target directory where archives are extracted to . Equals to source directory by default . Return list of str List of extracted files .
def unzip_all(src_dir, dst_dir: str = None, remove_archive: bool = False) -> str:
    if not dst_dir:
        dst_dir = src_dir
    filenames = []
    for fn in os.listdir(src_dir):
        if fn.lower().endswith(".zip"):
            fp = os.path.join(src_dir, fn)
            filenames.append(unzip(fp, dst_dir))
    return _flatten(filenames)
def unzip_all ( src_dir , dst_dir : str = None , remove_archive : bool = False ) -> str : if not dst_dir : dst_dir = src_dir filenames = [ ] for fn in os . listdir ( src_dir ) : if fn . lower ( ) . endswith ( ".zip" ) : fp = os . path . join ( src_dir , fn ) filenames . append ( unzip ( fp , dst_dir ) ) return _flatten ( filenames )
Unzip all zip archives in a directory.
Unzip all zip archives in a directory .
"""Unzip all zip archives in a directory.

    Parameters
    ----------
    src_dir : str
        Source directory containing the zip archives.
    dst_dir : str, optional
        Target directory where archives are extracted to.
        Equals to source directory by default.

    Return
    ------
    list of str
        List of extracted files.
    """
src_dir
dst_dir
str
remove_archive
bool