Loadfile example not working

(rozy GCF) #1

Could not make the following example work task loadfile << {

def files = file(’…/antLoadfileResources’).listFiles().sort()

files.each { File file ->

if (file.isFile()) {

ant.loadfile(srcFile: file, property: file.name)

println " *** $file.name ***"

println “${ant.properties[file.name]}”


} }

getting error : Cannot invoke method sort() on null object. Apparently file(’…/antLoadfileResources’).listFiles() is not returning any object. There are files in the current folder, am i missing soemthing?