Groovy file and directory attributes
if (args.size() < 1) {
println("Missing filename")
System.exit(1)
}
name = args[0]
fh = new File(name)
println("file : " + fh.isFile())
println("dir : " + fh.isDirectory())
println("executable: " + fh.canExecute())
See also File
timestamp: 2019-04-16T15:50:01 tags:
- File
- canExecute
- isFile
- isDirectory