{"categories":[{"label":"Filesystems","url":"https://skillfed.io/packages/category/system-filesystems"},{"label":"Operating System","url":"https://skillfed.io/packages/category/system-operating-system"}],"enrichment":{"capability":"Provides faster directory iteration and os.walk() replacement by yielding DirEntry objects with cached file type and stat information, avoiding redundant system calls.","skillfed_tags":["filesystem","legacy-python","performance"],"use_cases":["Recursively walking large directory trees on Python 2.7 or 3.4 where os.scandir() is unavailable.","Filtering files by type (directory, symlink, regular file) without extra stat() calls in legacy codebases.","Iterating very large directories with memory constraints by using a generator instead of loading all names at once.","Porting code from Python 3.5+ back to older Python versions while maintaining performance.","Batch file operations (copying, deleting, analyzing) where avoiding redundant stat calls matters."],"what_it_does":"scandir is a backport of os.scandir() from Python 3.5+, providing a faster alternative to os.walk() and os.listdir() by returning DirEntry objects with cached file type and stat information. Instead of making separate system calls to determine whether each entry is a file or directory, it reuses data already returned by the OS, reducing overhead by roughly 2\u201320 times depending on platform and filesystem. The package yields results as a generator rather than a list, improving memory efficiency for large directories.\n\nThe module is intended for Python 2.7 and 3.4+, though it has been archived and is no longer maintained. On Python 3.5 and later, the built-in os.scandir() is available and should be preferred; this package exists mainly as a compatibility shim for older Python versions that are themselves now out of support.","worth_installing":"No, unless you are stuck on Python 2.7 or 3.4 and cannot upgrade. The package is abandoned (last release 2019, repository archived), and Python 3.5+ includes os.scandir() in the standard library. If you are on a modern Python version, use os.scandir() directly. If you must support legacy Python, this package works but will receive no updates."},"id":"scandir","links":{"html":"https://skillfed.io/packages/scandir","md":"https://skillfed.io/packages/scandir.md","pypi":"https://pypi.org/project/scandir/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2019-03-09","license_spdx":null,"license_treatment":"permissive","name":"scandir","python_support":"unspecified","summary":"scandir, a better directory iterator and faster os.walk()"},"popularity":{"monthly_downloads":2332754,"position":3131,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.10.0"}
