add walkDirRecFilter
recursive glob with follow filter (has full implementation)
#261
Labels
walkDirRecFilter
recursive glob with follow filter (has full implementation)
#261
proposal
I wrote this
lib/std/private/globs.nim
some time ago for use in kochdocs; this RFC is to move it to stdlib inside os.nim or a newstd/globs.nim
design rationale
yieldFilter
(as done in pkg/glob (/cc @citycide see http://bolingen.me/glob/latest/glob.html) or even a selection for pcFile, pcDir etc (as done inos.walkDirRec
): this can all be done in client code (unlike what's done infollow
filter since it'd be "too late").walkDirRec
can be re-written by callingwalkDirRecFilter
(and could be deprecated maybe)discussion
s/walkDirRecFilter/glob
?sortBy = cmp
(by a user defined unary or binarycmp
proc); this could be done by doing a bit of refactoring by adding std/sorts so that os canimport std/sorts
and std/algorithm canimport std/sorts
, to avoid too much dependencies in std/oswalkDirRecFilter
to a new modulestd/globs
; it might be better but that would prevent de-dupingwalkDirRec
fusion/globs
but that requires accepting RFC: fusion should be importable by compiler sources, and even stdlib and koch fusion#22 so that kochdocs canimport fusion/globs
The text was updated successfully, but these errors were encountered: