def is_path_ignored(path: Path) -> bool: """Returns True if |path| is a subpath of an ignored directory or is a third_party directory.""" for ignore_directory in _IGNORE_DIRECTORIES: if filesystem.is_subpath(ignore_directory, path): return True # Third party directories can be anywhere. path_parts = str(path).split(os.sep) if any(path_part == THIRD_PARTY_DIR_NAME for path_part in path_parts): return True return False
def is_path_in_ignore_directory(path: Path) -> bool: """Returns True if |path| is a subpath of an ignored directory.""" for ignore_directory in _IGNORE_DIRECTORIES: if filesystem.is_subpath(ignore_directory, path): return True return False
def is_fuzzers_subpath(path: str) -> bool: """Returns True if path is a subpath of the fuzzers/ directory.""" return filesystem.is_subpath(fuzzer_utils.FUZZERS_DIR, path)