Closed hdgarrood closed 7 years ago
I'd certainly be happy to have tests for these functions.
Sorry, I've no time to look at the changes right now but I should be able to review tomorrow.
No rush at all! I'll add some tests soon.
Ok, these tests are quite basic but I think they ought to cover the stuff I've added.
Ok - how does this look now?
Looks good, thanks again!
Thanks for the review :)
Fixes #11
GlobOptions
data type which provides a newBool
flag to control whether unmatched files should be included in the results of the globbing functions.globDir
to not return unmatched files so that it is more in line withglobDir1
.globDirWith
to accept aGlobOptions
rather than aMatchOptions
.globDirWith
so that the unmatched files are wrapped inMaybe
, in order to easily distinguish the situations where there were no unmatched files vs where the user did not ask for a list of unmatched files to be collected.These changes provide a significant performance boost in situations where the user doesn't care about the unmatched files, e.g. for functions like
glob
.There are no tests covering these changes currently, but I could try to add some if you'd like?