Lines Matching refs:path
27 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
37 os.path.abspath(
38 os.path.join(os.path.dirname(__file__), os.pardir, os.pardir,
62 if os.path.exists(dir_path):
66 def touch(path, fail_if_missing=False): argument
67 if fail_if_missing and not os.path.exists(path):
68 raise Exception(path + ' doesn\'t exist.')
70 make_directory(os.path.dirname(path))
71 with open(path, 'a'):
72 os.utime(path, None)
79 files.extend((os.path.join(root, f) for f in matched_files))
83 def read_build_vars(path): argument
85 with open(path) as f:
124 def write_json(obj, path, only_if_changed=False): argument
126 if os.path.exists(path):
127 with open(path, 'r') as oldfile:
136 with open(path, 'w') as outfile:
141 def atomic_output(path, only_if_changed=True): argument
159 with tempfile.NamedTemporaryFile(suffix=os.path.basename(path),
160 dir=os.path.dirname(path),
169 if not (only_if_changed and os.path.exists(path)
170 and filecmp.cmp(f.name, path)):
171 shutil.move(f.name, path)
173 if os.path.exists(f.name):
193 os.path.abspath(self.cwd), ' '.join(map(pipes.quote, self.args)))
260 def get_modified_time(path): argument
263 return max(os.lstat(path).st_mtime, os.stat(path).st_mtime)
267 if not os.path.exists(output):
278 if os.path.normpath(name) != name:
280 if os.path.isabs(name):
293 path=None,
297 if path is None:
298 path = os.getcwd()
299 elif not os.path.exists(path):
300 make_directory(path)
309 make_directory(os.path.join(path, name))
318 output_path = os.path.join(path, name)
319 if os.path.exists(output_path):
323 dest = os.path.join(path, name)
324 make_directory(os.path.dirname(dest))
328 z.extract(name, path)
329 extracted.append(os.path.join(path, name))
356 if src_path and os.path.islink(src_path):
407 tup = (os.path.relpath(tup, base_dir), tup)
415 zip_path = os.path.join(zip_prefix_path, zip_path)
428 inputs.append(os.path.join(root, f))
438 def matches_glob(path, filters): argument
440 return filters and any(fnmatch.fnmatch(path, f) for f in filters)
552 abs_module_paths = list(map(os.path.abspath, module_paths))
554 assert os.path.isabs(DIR_SOURCE_ROOT)
567 map(os.path.relpath, non_system_module_paths))
602 make_directory(os.path.dirname(depfile_path))
731 result.extend([os.path.join(root, f) for f in files])
738 return os.path.relpath(os.path.join(current_base, input), new_base)
740 return os.path.realpath(os.path.join(current_base, input))