gpt4 book ai didi

scala - 我如何使用 sbt.IO?

转载 作者:行者123 更新时间:2023-12-04 06:20:07 28 4
gpt4 key购买 nike

我注意到许多 Scala 项目使用 sbt.IO它具有出色的文件系统和 IO 实用程序

例如。有用的东西,如:

def gzip(in: File, out: File)
def download(url: URL, to: File)
def copyDirectory(source: File, target: File, overwrite: Boolean = false, preserveLastModified: Boolean = false):

但是我在任何 Maven repo 中都找不到它(很有趣),我错过了什么?

最佳答案

Scala2.9

resolvers += Resolver.url("typesafe", url("http://repo.typesafe.com/typesafe/ivy-releases/"))(Resolver.ivyStylePatterns)

libraryDependencies += "org.scala-sbt" % "io" % "0.12.4"

scalaVersion := "2.9.3"

Scala2.10

resolvers += Resolver.url("typesafe", url("http://repo.typesafe.com/typesafe/ivy-releases/"))(Resolver.ivyStylePatterns)

libraryDependencies += "org.scala-sbt" % "io" % "0.13.9"

scalaVersion := "2.10.6"

Scala2.11

resolvers += Resolver.url("typesafe", url("http://repo.typesafe.com/typesafe/ivy-releases/"))(Resolver.ivyStylePatterns)

libraryDependencies += "org.scala-sbt" %% "io" % "0.13.9"

scalaVersion := "2.11.7"

关于scala - 我如何使用 sbt.IO?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18282402/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com