Skip to content

Instantly share code, notes, and snippets.

View TendsToInfinity's full-sized avatar

Alankrit Mishra TendsToInfinity

  • Fintellix Solutions
  • Bangalore
View GitHub Profile
@yangkun
yangkun / file_list.groovy
Created April 4, 2013 17:03
[groovy] list dirs/files (dir first and sort as name)
import groovy.io.*
def listfiles(dir) {
dlist = []
flist = []
new File(dir).eachDir {dlist << it.name }
dlist.sort()
new File(dir).eachFile(FileType.FILES, {flist << it.name })
flist.sort()
return (dlist << flist).flatten()