Help us understand the problem. What is going on with this article?

Pathオブジェクトでのファイルの探索

More than 5 years have passed since last update.
import java.nio.file._

// ファイルを探索する
def walkFiles(path:Path) {
    val visitor = new SimpleFileVisitor[Path] {
        override 
        def preVisitDirectory(
            dir:Path
        ,   attr:BasicFileAttributes
        ):  FileVisitResult = {
            println(dir)
            FileVisitResult.CONTINUE
        }
        override 
        def visitFile(
            file:Path
        ,   attr:BasicFileAttributes
        ):  FileVisitResult = {
            println(file)
            FileVisitResult.CONTINUE
        }
    }
    Files.walkFileTree(path, visitor);
}
// Zip内のファイルを列挙
walkFiles(zipFs.getPath("/"))

6in
窓際エンジニアです
future
ITを武器とした課題解決型のコンサルティングサービスを提供します
http://future-architect.github.io/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away