globby
globby copied to clipboard
Allow abort glob progress
I was racing a globby call with a 200ms timeout so that I can fallback to a default value if glob takes too long, I’d also like to abort glob progress if timeout happens to save some filesystem scan and cpu usage, how about if we can pass an AbortSignal
in oprions?
Another case is to implement something like globExists
which returns true on first match, this is done by using globStream
function and directly return true in the for … await
loop, also I’d like to abort further progress of glob
Of course it’s a best if a globExists
function can be provided.
Makes sense, but it will have to be implemented in https://github.com/mrmlnc/fast-glob first. Open an issue there too.