INNER CODE UNIT · Python

collect_tree_files

zhinkgit/embeddedskills · .github/maintenance/package_release.py:55

def collect_tree_files(
    directory: Path,
    root: Path,
    output_directory: Path,
) -> list[Path]:
    files: list[Path] = []
    for current, directory_names, file_names in os.walk(
        directory, topdown=True, followlinks=False
    ):
        current_directory = Path(current)
        included_directories: list[str] = []
        for name in directory_names:
            path = current_directory / name
            resolved = path.resolve()
            if is_output_path(path, root, output_directory):
                continue
            if path.is_symlink() or not resolved.is_relative_to(root):
                raise ValueError(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…