chrome/updater/win/installer/create_installer_archive.py
def CopySectionFilesToStagingDir(config, section, staging_dir, src_dir,
                                 timestamp):
  """Copies installer archive files specified in section from src_dir to
  staging_dir. This method reads section from config and copies all the
  files specified from src_dir to staging dir.
  """
  for option in config.options(section):
    src_subdir = option.replace('\\', os.sep)
    dst_dir = os.path.join(staging_dir, config.get(section, option))
    dst_dir = dst_dir.replace('\\', os.sep)
    src_paths = glob.glob(os.path.join(src_dir, src_subdir))
    for src_path in src_paths:
      if dst_dir.endswith(os.sep):
        dst_path = os.path.join(dst_dir, os.path.basename(src_path))
      else:
        dst_path = dst_dir
      if not os.path.exists(dst_path):
        if not os.path.exists(os.path.dirname(dst_path)):
          os.makedirs(os.path.dirname(dst_dir))
        g_archive_inputs.append(src_path)
        shutil.copy(src_path, dst_path)
        os.utime(dst_path, (os.stat(dst_path).st_atime, timestamp))
    os.utime(dst_dir, (os.stat(dst_dir).st_atime, timestamp))
Copies installer archive files specified in section from src_dir to
  staging_dir. This method reads section from config and copies all the
  files specified from src_dir to staging dir.
  
Copies installer archive files specified in section from src_dir to
staging_dir. This method reads section from config and copies all the
files specified from src_dir to staging dir.
Copies installer archive files specified in section from src_dir to staging_dir . This method reads section from config and copies all the files specified from src_dir to staging dir .
def CopySectionFilesToStagingDir(config, section, staging_dir, src_dir,
                                 timestamp):
  for option in config.options(section):
    src_subdir = option.replace('\\', os.sep)
    dst_dir = os.path.join(staging_dir, config.get(section, option))
    dst_dir = dst_dir.replace('\\', os.sep)
    src_paths = glob.glob(os.path.join(src_dir, src_subdir))
    for src_path in src_paths:
      if dst_dir.endswith(os.sep):
        dst_path = os.path.join(dst_dir, os.path.basename(src_path))
      else:
        dst_path = dst_dir
      if not os.path.exists(dst_path):
        if not os.path.exists(os.path.dirname(dst_path)):
          os.makedirs(os.path.dirname(dst_dir))
        g_archive_inputs.append(src_path)
        shutil.copy(src_path, dst_path)
        os.utime(dst_path, (os.stat(dst_path).st_atime, timestamp))
    os.utime(dst_dir, (os.stat(dst_dir).st_atime, timestamp))
def CopySectionFilesToStagingDir ( config , section , staging_dir , src_dir , timestamp ) : for option in config . options ( section ) : src_subdir = option . replace ( '\\' , os . sep ) dst_dir = os . path . join ( staging_dir , config . get ( section , option ) ) dst_dir = dst_dir . replace ( '\\' , os . sep ) src_paths = glob . glob ( os . path . join ( src_dir , src_subdir ) ) for src_path in src_paths : if dst_dir . endswith ( os . sep ) : dst_path = os . path . join ( dst_dir , os . path . basename ( src_path ) ) else : dst_path = dst_dir if not os . path . exists ( dst_path ) : if not os . path . exists ( os . path . dirname ( dst_path ) ) : os . makedirs ( os . path . dirname ( dst_dir ) ) g_archive_inputs . append ( src_path ) shutil . copy ( src_path , dst_path ) os . utime ( dst_path , ( os . stat ( dst_path ) . st_atime , timestamp ) ) os . utime ( dst_dir , ( os . stat ( dst_dir ) . st_atime , timestamp ) )
Copies installer archive files specified in section from src_dir to
staging_dir.
Copies installer archive files specified in section from src_dir to staging_dir .
"""Copies installer archive files specified in section from src_dir to
  staging_dir. This method reads section from config and copies all the
  files specified from src_dir to staging dir.
  """
config
section
staging_dir
src_dir
timestamp