简体   繁体   English

scala.tools.nsc包的目的是什么?

[英]What is the purpose of the scala.tools.nsc package?

I've spent a good few hours googling for something to allow me to open Zip files in Scala (I know you can just use the Java API, but I was hoping to find a Scala friendly wrapper for it instead of faffing about writing Buffered/FileInputstream and so on) 我花了几个小时谷歌搜索一些东西,允许我在Scala中打开Zip文件(我知道你可以使用Java API,但我希望找到一个Scala友好的包装器,而不是写关于编写Buffered / FileInputstream等)

So I was just messing about in the REPL and found this package 所以我只是在REPL中乱搞并发现了这个包

scala.tools.nsc.io.ZipArchive

Which after some digging and using this scala.tools.nsc.io.File , I managed to open a zip archive with all of the Scala niceness (being able to foreach etc) 经过一些挖掘和使用这个scala.tools.nsc.io.File ,我设法打开了一个包含所有Scala优点的zip存档(能够foreach等)

The thing is I can't see any mention of this package in the official Scala 2.8.1 API document, so I was just wondering why there's no documentation on it? 事情是我在官方的Scala 2.8.1 API文档中看不到任何提及这个包,所以我只是想知道为什么没有关于它的文档? What is it? 它是什么?

this package contains Compiler-related classes. 此包包含与编译器相关的类。 It's mainly used (as far as I know) for Plugin creation. 它主要用于(据我所知)插件创建。

Due to it being related to Scala compiler, I'm not sure to which point it is a "stable" package and how much may it change between Scala versions, so be careful there. 由于它与Scala编译器有关,我不确定它是一个“稳定”的包,它在Scala版本之间可以改变多少,所以要小心。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM