Skip to content

Instantly share code, notes, and snippets.

@demoth
Created November 28, 2013 12:13
Show Gist options
  • Save demoth/7690942 to your computer and use it in GitHub Desktop.
Save demoth/7690942 to your computer and use it in GitHub Desktop.
get size of java files in folder and subfolders
def sum = 0;
new File('.').eachFileRecurse {
if(it.name.endsWith('.java'))
sum += it.size()
}
sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment