Author Login
Post Reply
I could just not know how closures work but why do I get this response I even
tried adding a return before the closure but no dice
FileName:IN
text
text
FileText:[Ljava.io.File;@(protected)
from this code
public static void main(args)
{
Config test = new Config()
println "FileName:${test.getInFolder().name}"
FileRetriever fileRet = new FileRetriever()
println "FileText:${fileRet.getLibraryOrderFile()}"
}
public String getLibraryOrderFile()
{
File configIn = config.getInFolder()
def fileText=""
if (!config.getInFolder())
{
return
}
def returnValue
configIn.listFiles().each { file ->
def root = new XmlSlurper().parse(file.newInputStream())
if(root?.message?.@(protected)"))
{
println root.toString()
return root.toString()
}
}
}
--
Sent from the groovy - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email