2013-08-16 52 views
8

Tôi đã nhận thấy rằng nhiều dự án Scala sử dụng sbt.IO có hệ thống tệp tuyệt vời và tiện ích IOTôi có thể sử dụng sbt.IO như thế nào?

Ví dụ: những điều hữu ích như:

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

Tuy nhiên tôi không thể tìm thấy nó (vui vẻ) trong bất kỳ repo maven chính thức nào, tôi đang thiếu gì?

Trả lời

12

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" 
+0

Cảm ơn bạn! bất kỳ ý tưởng giấy phép cho nó là gì? tôi có thể sử dụng nó trong thư viện không? –

+1

@EranMedan sbt thuộc giấy phép theo phong cách BSD, xem [LICENSE] (https://github.com/sbt/sbt/blob/0.13/LICENSE) – gourlaysama

Các vấn đề liên quan