def get(self, path): srcpath = os.path.join(self.base, path) if not os.path.lexists(srcpath): return None for p in self.ignore: if mozpath.match(path, p): return None if self.find_executables and is_executable(srcpath): return ExecutableFile(srcpath) else: return File(srcpath)
def _find_file(self, path): ''' Actual implementation of FileFinder.find() when the given pattern corresponds to an existing file under the base directory. ''' srcpath = os.path.join(self.base, path) if not os.path.exists(srcpath): return if is_executable(srcpath): yield path, ExecutableFile(srcpath) else: yield path, File(srcpath)
def _find_file(self, path): ''' Actual implementation of FileFinder.find() when the given pattern corresponds to an existing file under the base directory. ''' srcpath = os.path.join(self.base, path) if not os.path.exists(srcpath): return if self.find_executables and is_executable(srcpath): yield path, ExecutableFile(srcpath) else: yield path, File(srcpath)
def _find_file(self, path): """ Actual implementation of FileFinder.find() when the given pattern corresponds to an existing file under the base directory. """ srcpath = os.path.join(self.base, path) if not os.path.exists(srcpath): return for p in self.ignore: if mozpath.match(path, p): return if self.find_executables and is_executable(srcpath): yield path, ExecutableFile(srcpath) else: yield path, File(srcpath)