Re: [racket-users] ANN: glob, for Unix-style globbing

2015-03-31 Thread 'John Clements' via users-redirect

On Mar 30, 2015, at 11:15 PM, Benjamin Greenman  wrote:

> I've pushed a script for globbing to the package server. It exports two 
> functions, `glob` and `in-glob`. I hope that some day functions like these 
> can be in racket/file, but until then, enjoy.

This looks useful. Thanks!

John Clements

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] ANN: glob, for Unix-style globbing

2015-03-30 Thread Benjamin Greenman
I've pushed a script for globbing to the package server. It exports two
functions, `glob` and `in-glob`. I hope that some day functions like these
can be in racket/file, but until then, enjoy.

(glob "./files/*.rkt")
Returns a list of all files ending with the .rkt extension in the directory
"files"

(in-glob "./files/*.rkt")
Same as glob, but returns a generator-backed sequence.


By default, the results don't contain dotfiles. You can override this
behavior by giving #t as a second argument, like in `(glob "*" #t)`.

The ~ character isn't expanded right now, but otherwise these functions
should do the same thing as your favorite shell. Let me know if you find a
counterexample.
https://github.com/bennn/glob/issues

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.