Determine the size of a file

The lengt function prints out the size of a file.


File file = new File("test.txt")
println "file has ${file.length()} bytes