##// END OF EJS Templates
pathutil: add the more efficient finddir iterator...
Arseniy Alekseyev -
r50802:7623d79f default
parent child Browse files
Show More
@@ -314,6 +314,13 b' def finddirs(path):'
314 yield b''
314 yield b''
315
315
316
316
317 def finddirs_rev_noroot(path: bytes) -> Iterator[bytes]:
318 pos = path.find(pycompat.ossep)
319 while pos != -1:
320 yield path[:pos]
321 pos = path.find(pycompat.ossep, pos + 1)
322
323
317 class dirs:
324 class dirs:
318 '''a multiset of directory names from a set of file paths'''
325 '''a multiset of directory names from a set of file paths'''
319
326
General Comments 0
You need to be logged in to leave comments. Login now