tools/resources/ar.py
def ExpandThinArchives(paths):
  """Expands all thin archives found in |paths| into .o paths.

  Args:
    paths: List of paths relative to |output_directory|.
    output_directory: Output directory.

  Returns:
    * A new list of paths with all archives replaced by .o paths.
  """
  expanded_paths = []
  for path in paths:
    if not path.endswith('.a'):
      expanded_paths.append(path)
      continue

    with open(path, 'rb') as f:
      header = f.read(8)
      is_thin = header == b'!<thin>\n'
      if is_thin:
        for subpath in _IterThinPaths(path):
          expanded_paths.append(_ResolveThinObjectPath(path, subpath))
      elif header != b'!<arch>\n':
        raise Exception('Invalid .a: ' + path)

  return expanded_paths
Expands all thin archives found in |paths| into .o paths.

  Args:
    paths: List of paths relative to |output_directory|.
    output_directory: Output directory.

  Returns:
    * A new list of paths with all archives replaced by .o paths.
  
Expands all thin archives found in |paths| into .o paths.
Expands all thin archives found in |paths| into . o paths .
def ExpandThinArchives(paths):
  expanded_paths = []
  for path in paths:
    if not path.endswith('.a'):
      expanded_paths.append(path)
      continue
    with open(path, 'rb') as f:
      header = f.read(8)
      is_thin = header == b'!<thin>\n'
      if is_thin:
        for subpath in _IterThinPaths(path):
          expanded_paths.append(_ResolveThinObjectPath(path, subpath))
      elif header != b'!<arch>\n':
        raise Exception('Invalid .a: ' + path)
  return expanded_paths
def ExpandThinArchives ( paths ) : expanded_paths = [ ] for path in paths : if not path . endswith ( '.a' ) : expanded_paths . append ( path ) continue with open ( path , 'rb' ) as f : header = f . read ( 8 ) is_thin = header == b'!<thin>\n' if is_thin : for subpath in _IterThinPaths ( path ) : expanded_paths . append ( _ResolveThinObjectPath ( path , subpath ) ) elif header != b'!<arch>\n' : raise Exception ( 'Invalid .a: ' + path ) return expanded_paths
Expands all thin archives found in |paths| into .o paths.
Expands all thin archives found in |paths| into . o paths .
"""Expands all thin archives found in |paths| into .o paths.

  Args:
    paths: List of paths relative to |output_directory|.
    output_directory: Output directory.

  Returns:
    * A new list of paths with all archives replaced by .o paths.
  """
A new list of paths with all archives replaced by .o paths.
A new list of paths with all archives replaced by . o paths .
paths
List of paths relative to |output_directory|.
List of paths relative to |output_directory| .
output_directory
None