chrome/test/mini_installer/create_zip.py
def ArchiveDirectory(path, zipf):
    """Archive an entire directory and subdirectories.

    This will skip files that have an extension in BLOCKLIST.

    Args:
        path: The path to the current directory.
        zipf: A handle to a ZipFile instance.
    """
    logging.debug('Archiving %s', path)
    for c_path in [os.path.join(path, name) for name in os.listdir(path)]:
        if os.path.isfile(c_path):
            if os.path.splitext(c_path)[-1] in BLOCKLIST:
                continue
            logging.debug('Adding %s', os.path.relpath(c_path, SRC_DIR))
            zipf.write(c_path, os.path.relpath(c_path, SRC_DIR))
        elif os.path.isdir(c_path):
            ArchiveDirectory(c_path, zipf)
Archive an entire directory and subdirectories.

    This will skip files that have an extension in BLOCKLIST.

    Args:
        path: The path to the current directory.
        zipf: A handle to a ZipFile instance.
    
Archive an entire directory and subdirectories.
This will skip files that have an extension in BLOCKLIST.
Archive an entire directory and subdirectories . This will skip files that have an extension in BLOCKLIST .
def ArchiveDirectory(path, zipf):
    logging.debug('Archiving %s', path)
    for c_path in [os.path.join(path, name) for name in os.listdir(path)]:
        if os.path.isfile(c_path):
            if os.path.splitext(c_path)[-1] in BLOCKLIST:
                continue
            logging.debug('Adding %s', os.path.relpath(c_path, SRC_DIR))
            zipf.write(c_path, os.path.relpath(c_path, SRC_DIR))
        elif os.path.isdir(c_path):
            ArchiveDirectory(c_path, zipf)
def ArchiveDirectory ( path , zipf ) : logging . debug ( 'Archiving %s' , path ) for c_path in [ os . path . join ( path , name ) for name in os . listdir ( path ) ] : if os . path . isfile ( c_path ) : if os . path . splitext ( c_path ) [ - 1 ] in BLOCKLIST : continue logging . debug ( 'Adding %s' , os . path . relpath ( c_path , SRC_DIR ) ) zipf . write ( c_path , os . path . relpath ( c_path , SRC_DIR ) ) elif os . path . isdir ( c_path ) : ArchiveDirectory ( c_path , zipf )
Archive an entire directory and subdirectories.
Archive an entire directory and subdirectories .
"""Archive an entire directory and subdirectories.

    This will skip files that have an extension in BLOCKLIST.

    Args:
        path: The path to the current directory.
        zipf: A handle to a ZipFile instance.
    """
path
The path to the current directory.
The path to the current directory .
zipf
A handle to a ZipFile instance.
A handle to a ZipFile instance .