Michael Knapp wrote:
> ...
> So, I don't know the syntax for actually doing the groovy equivalent of a 
> 'ls' 
> system command, and i haven't seen any comprehensive groovy references
> (i've looked, believe me).  It didn't appear to me that the methods
you use above

would actually do the equivalent of an ls.  Also - the ls-equivalent
must support globbing,

as the filenames are stored like: [known-key].[unknown-value].
> 

As long as Dierk's Groovy in Action has not been published, you're
forgiven ;-)

In a first time just remember that you can ~ just programm Groovy, like
java with something like:
File f = new File(...)
String[] fileNames = f.list();
etc

in a second time you can have a look at
http://groovy.codehaus.org/groovy-jdk.html to see the nice additional
methods the GDK brings and do something like:

File f = new File(...)
theFile = f.listFiles().toList().find { ... }

I recommand you to install Groovy and start the groovyConsole to start
playing with something like:
f = new File("tmp");
f.eachFileMatch( {it =~ /protected\.regNumber.*/}) { println it }

Marc.

PS: I'm sure that my Groovy code is not Groovy enough and could be
improved, but Dierk is not there ;-)

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to