Tuesday 26 June 2018

java.nio.file.Path Class in Groovy

Cited from Groovy Goodness: Extra Methods for NIO Path

Groovy adds a lot of extra methods to the File object to work with the contents or find and filter files in a directory. These methods are now also added to the java.nio.file.Path class since Groovy 2.3.

In a groovy script, the java.nio.file.Path class can be imported as the following. 

import java.nio.file.*

No comments:

Post a Comment