All Downloads are FREE. Search and download functionalities are using the official Maven repository.

poly.util.io.DirectoryIO.scala Maven / Gradle / Ivy

The newest version!
package poly.util.io

import java.io._

/**
 * @author Tongfei Chen ([email protected]).
 */
object DirectoryIO {

  def listFiles(dir: String) = new File(dir).listFiles()

  def recursivelyListFiles(dir: String): Seq[File] = {
    val files = new File(dir).listFiles()
    files.view.filter(!_.isDirectory) ++ files.view.filter(_.isDirectory).flatMap(f => recursivelyListFiles(f.getAbsolutePath))
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy