def GetExpandedPaths(
    args):
  """Expands given path patterns.

  Args:
    args: A `FileFinderArgs` instance that dictates the behaviour of the path
      expansion.

  Yields:
    Absolute paths (as string objects) derived from input patterns.

  Raises:
    ValueError: For unsupported path types.
  """
  if args.pathtype == rdf_paths.PathSpec.PathType.OS:
    pathtype = rdf_paths.PathSpec.PathType.OS
  else:
    raise ValueError("Unsupported path type: ", args.pathtype)

  opts = globbing.PathOpts(
      follow_links=args.follow_links,
      recursion_blacklist=_GetMountpointBlacklist(args.xdev),
      pathtype=pathtype)

  for path in args.paths:
    for expanded_path in globbing.ExpandPath(str(path), opts):
      yield expanded_path
def GetExpandedPaths ( args ) : if args . pathtype == rdf_paths . PathSpec . PathType . OS : pathtype = rdf_paths . PathSpec . PathType . OS else : raise ValueError ( "Unsupported path type: " , args . pathtype ) opts = globbing . PathOpts ( follow_links = args . follow_links , recursion_blacklist = _GetMountpointBlacklist ( args . xdev ) , pathtype = pathtype ) for path in args . paths : for expanded_path in globbing . ExpandPath ( str ( path ) , opts ) : yield expanded_path
Expands given path patterns.

  Args:
    args: A `FileFinderArgs` instance that dictates the behaviour of the path
      expansion.

  Yields:
    Absolute paths (as string objects) derived from input patterns.

  Raises:
    ValueError: For unsupported path types.