This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
> > (define (find-files dir . arg-ls) > "Return a list of files within directory DIR. Two optional arguements > are supported, PREDICATE and RECURSE?. PREDICATE should be a procedure > of one argument that determines whether a particular file should be included > in the returned list. As a special case, if PREDICATE is a string, it is > compiled into a regular expression, and a predicate is generated that applies > this regular expression to the filename. RECURSE? determines whether the > procedure descends into subdirectories, and it defaults to #t. Symbolic > links are not followed." I have the impression that most of this functionality can be obtained from scsh's file-match. scsh also contains a very nice glob function. I think it would be much better to integrate scsh with guile more tightly than starting to write a library from scratch (1) because scsh is very well designed (2) it's kind of a semi-standard for shell-like things in scheme and (3) part of the integration with guile has been done already. What I miss the most and what keeps me the most from using scsh more in scripts is that the guile-scsh port is not modularized, so even if you need only file-match and glob, you have to load all of scsh (and globbing doesn't use all that much process-control stuff). I once had a stab at putting scsh into modules but gave up, since I decided to wait for Godot :) To make a long story short: I think a good implementation of scsh in guile would really help it for all kinds of scripting tasks. Just my $.02, David