Mercurial > hgrepos > Python > apps > py-cutils
comparison cutils/util/walk.py @ 195:e5f6f4db9157
Use the imported "scandir()" implementation instead always the "os.scandir"
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 16 Jan 2025 19:31:57 +0100 |
| parents | 188de62caac6 |
| children | 0f4febf646f5 |
comparison
equal
deleted
inserted
replaced
| 194:938488f87b62 | 195:e5f6f4db9157 |
|---|---|
| 155 | 155 |
| 156 __slots__ = ("_scandir_it", ) | 156 __slots__ = ("_scandir_it", ) |
| 157 | 157 |
| 158 def __init__(self, path): | 158 def __init__(self, path): |
| 159 super(ScanDir, self).__init__() | 159 super(ScanDir, self).__init__() |
| 160 self._scandir_it = os.scandir(path) | 160 self._scandir_it = scandir(path) |
| 161 | 161 |
| 162 def __iter__(self): | 162 def __iter__(self): |
| 163 return self | 163 return self |
| 164 | 164 |
| 165 def __next__(self): | 165 def __next__(self): |
