How do I list all files in a subdirectory in scala?

后端 未结 19 1474
旧巷少年郎
旧巷少年郎 2020-11-28 03:35

Is there a good \"scala-esque\" (I guess I mean functional) way of recursively listing files in a directory? What about matching a particular pattern?

For example re

19条回答
  •  抹茶落季
    2020-11-28 04:16

    Take a look at scala.tools.nsc.io

    There are some very useful utilities there including deep listing functionality on the Directory class.

    If I remember correctly this was highlighted (possibly contributed) by retronym and were seen as a stopgap before io gets a fresh and more complete implementation in the standard library.

提交回复
热议问题