{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/2"}],"enrichment":{"capability":"Recursively scans directories with flexible filtering, wildcard matching, and in-memory tree representation, providing extended file metadata and cyclic symlink detection.","skillfed_tags":["filesystem","directory-scanning"],"use_cases":["Find all files matching a pattern (e.g., '*.txt') across nested directories with relative and absolute path access","Build an in-memory representation of a directory tree for repeated queries without re-scanning the filesystem","Detect and safely handle cyclic symlinks during recursive directory traversal","Aggregate statistics or metadata across a file tree using the apply() method with custom file and directory handlers","Compare directory structures before and after filesystem operations using tree equality checks"],"what_it_does":"scantree is a recursive directory scanner that combines the functionality of os.scandir with glob-style pattern matching. It builds an in-memory representation of a file tree, allowing repeated access without re-scanning the filesystem. The library extends the standard os.DirEntry interface with additional path information (real paths, paths relative to the recursion root) and includes built-in detection and handling of cyclic symlinks.\n\nThe package is typically used when you need flexible filtering of directory contents\u2014such as matching files by wildcard patterns or custom predicates\u2014while also needing efficient access to file metadata or the ability to traverse and aggregate information across the tree structure. It handles symlinks gracefully, distinguishing between regular symlinks and cycles that would otherwise cause infinite recursion.","worth_installing":"Yes. scantree is actively maintained, has no known vulnerabilities, minimal dependencies, and solves a real problem\u2014flexible directory iteration with symlink safety and in-memory caching. Use it when you need pattern-based directory filtering or repeated tree access; skip it if you only need a single pass over the filesystem."},"id":"scantree","links":{"html":"https://skillfed.io/packages/scantree","md":"https://skillfed.io/packages/scantree.md","pypi":"https://pypi.org/project/scantree/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2024-08-03","license_spdx":null,"license_treatment":"permissive","name":"scantree","python_support":"supports_current","summary":"Flexible recursive directory iterator: scandir meets glob(\"**\", recursive=True)"},"popularity":{"monthly_downloads":13323146,"position":1286,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.0.4"}
