scala.reflect.io 的 Scaladoc API?

Scaladoc API of scala.reflect.io?

有 scala.reflect.io 的 public Scaladoc API 吗?那里似乎有有用的 IO 实用程序。使用这些而不是 Java IO 会更有益吗?

看到 Scala 2.11.8 Source 有一个对象 scala.reflect.io.Directory 允许对目录进行操作:

scala> val cd = scala.reflect.io.Directory(".")
cd: scala.reflect.io.Directory = .

scala> cd.toCanonical
res0: scala.reflect.io.Path = /home/myusername/myProject1

scala> cd. <TAB>
/                   dirs           isDirectory    parent               toCanonical
addExtension        endsWith       isEmpty        parents              toDirectory
canRead             equals         isFile         path                 toFile
canWrite            exists         isFresher      relativize           toString
changeExtension     extension      isSame         resolve              toURI
createDirectory     files          jfile          segments             toURL
createFile          hasExtension   lastModified   separator            truncate
deepFiles           hashCode       length         separatorStr         walk
deepList            ifDirectory    list           stripExtension       walkFilter
delete              ifFile         name           toAbsolute
deleteRecursively   isAbsolute     normalize      toAbsoluteWithRoot

scala.reflect.io 被明确排除在 scaladoc 生成之外,正如您在构建定义 here 中看到的那样。鉴于那里每个文件开头的注释:''Note: This library is considered experimental and should not be used unless you know what you are doing.'' 我不认为它是一个选项,至少除非你知道你在做什么。

我认为最接近标准 Scala 文件 I/O 库的是 better-files,它是 Java NIO 文件内容的包装器。