yield x
+@tools.profile
def expand_symlinks(indir, relfile):
"""Follows symlinks in |relfile|, but treating symlinks that point outside the
build tree as if they were ordinary directories/files. Returns the final
symlinks = []
while todo:
- pre_symlink, symlink, post_symlink = file_path.split_at_symlink(
- done, todo)
+ pre_symlink, symlink, post_symlink = file_path.split_at_symlink(done, todo)
if not symlink:
todo = file_path.fix_native_path_case(done, todo)
done = os.path.join(done, todo)
return relfile, symlinks
+@tools.profile
def expand_directory_and_symlink(indir, relfile, blacklist, follow_symlinks):
"""Expands a single input. It can result in multiple outputs.
relfile = relfile[2:]
outfiles = symlinks
try:
- for filename in os.listdir(infile):
+ for filename in file_path.listdir(infile):
inner_relfile = os.path.join(relfile, filename)
if blacklist and blacklist(inner_relfile):
continue
return outfiles
+@tools.profile
def file_to_metadata(filepath, prevdict, read_only, algo):
"""Processes an input file, a dependency, and return meta data about it.