我正在尝试使用 rapture-io 写入文件。
我希望这至少可以编译(抱歉导入世界,试图让它工作):
import rapture.uri._
import rapture.io._
import rapture.fs._
import rapture.core._
import platform.posix
import rapture.codec._
import encodings.system
import modes.throwExceptions
val file = uri"file:///testFile.txt"
file > "hello world"
它无法编译并出现以下错误:
Cannot write Data data to String resources. Note that if you are working with Char data, you will require an implicit character encoding, e.g. import encodings.system or import encodings.`UTF-8`.
[error] file > "hello world"
[error] ^