Rework from_disk.Directory.from_disk() implementation
It used to traverse all the directory and filter elements of said tree only afterwards; this version should be a bit smarter and not go too far deep in directories that should be ignored. We cannot just use the subtree eviction mechanism of 'os.walk(topdown=True)' because the filtering callback takes some context of the subdirectory content (typically to be able to evict empty directories). This version of the code is a bit more complex but should do the trick.
Loading
Please register or sign in to comment