Lines Matching full:path

42     makefile = os.path.join(test_dir, MAKEFILE)
43 include = os.path.join(test_dir, INCLUDE)
44 single_include = os.path.join(test_dir, SINGLE_INCLUDE)
46 return (os.path.exists(makefile)
47 and os.path.isfile(makefile)
48 and os.path.exists(include)
49 and os.path.exists(single_include))
80 self.callback(os.path.commonpath(result_dirs))
84 def add_dir(self, path):
86 # add path to the set of event_dirs if it is not a sibling of
88 if not any(os.path.commonpath([path, event_dir]) == event_dir
90 self.event_dirs.add((datetime.now(), path))
101 self.rel_dir = os.path.relpath(tree_dir, root_dir)
102 self.name = os.path.basename(tree_dir)
103 self.include_dir = os.path.abspath(os.path.join(tree_dir, INCLUDE))
104 self.header = os.path.abspath(os.path.join(tree_dir, SINGLE_INCLUDE, HEADER))
105 self.rel_header = os.path.relpath(self.header, root_dir)
108 t = os.path.getmtime(self.header)
122 def update_dirty(self, path):
126 path = os.path.abspath(path)
127 if os.path.commonpath([path, self.include_dir]) == self.include_dir:
135 mtime = os.path.getmtime(self.header)
138 if mtime == os.path.getmtime(self.header):
165 scan_dir = os.path.abspath(scan_dirs.pop())
171 scan_dirs.add(entry.path)
173 logging.debug('path disappeared: %s', e)
191 url = os.path.join('/', tree.rel_dir, HEADER)
195 def rescan(self, path=None):
196 if path is not None:
197 path = os.path.abspath(path)
203 if ((path is None
204 or os.path.commonpath([path, tree.tree_dir]) == tree.tree_dir)
214 def find(self, path):
215 # find working tree for a given header file path
216 path = os.path.abspath(path)
219 if path == tree.header:
226 path = os.path.abspath(event.src_path)
230 self.created_bucket.add_dir(path)
233 self.rescan(path)
237 tree.update_dirty(path)
254 def translate_path(self, path):
255 path = os.path.abspath(super().translate_path(path))
257 # add single_include/nlohmann into path, if needed
258 header = os.path.join('/', HEADER)
259 header_path = os.path.join('/', SINGLE_INCLUDE, HEADER)
260 if (path.endswith(header)
261 and not path.endswith(header_path)):
262 path = os.path.join(os.path.dirname(path), SINGLE_INCLUDE, HEADER)
264 return path
267 # check if the translated path matches a working tree
269 path = self.translate_path(self.path)
270 self.worktree = self.worktrees.find(path)
275 logging.info(f'invalid request path: {self.path}')
362 os.chdir(os.path.realpath(os.path.join(sys.path[0], '../../')))
369 config_file = os.path.abspath(CONFIG_FILE)