Skip to content

Instantly share code, notes, and snippets.

@davidallsopp
Created September 26, 2013 09:53
Show Gist options
  • Save davidallsopp/6712090 to your computer and use it in GitHub Desktop.
Save davidallsopp/6712090 to your computer and use it in GitHub Desktop.
Recursively find files from a starting directory
def findFiles(d: File): Array[File] = {
val (dirs, files) = d.listFiles.partition(_.isDirectory)
files ++ dirs.flatMap(findFiles)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment