Forum Discussion

indraniria's avatar
indraniria
Contributor
3 years ago

How to use "break in the following loop?

for(File file: f.listFiles()) { if (file.getName().contains(date_time) ||file.getName().contains(next_day)){ file.eachLine{line -> if(line.contains(text)){ log.info file.getName() break } } ...