从 URL 下载/获取文件的 SBT 任务 [英] SBT task to download / fetch a file from a URL
本文介绍了从 URL 下载/获取文件的 SBT 任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
编写从已知 URL 下载文件到本地文件的 SBT 任务的推荐方法是什么?
What is a recommended way to write an SBT task that downloads a file from a known URL into a local file?
旧版本的 SBT 提供了 IO.download
可用于将 URL 下载到本地文件中,但在最近的版本 (1.2.8) 中,此方法不可用并且似乎 > 在代码中.
Older versions of SBT provided IO.download
which could be used to download a URL into a local file, but in recent versions (1.2.8) this method is not available and seem to be commented out in the code.
推荐答案
如文档所述 这里:
import scala.sys.process._
url("http://...") #> file("somefile") !
这篇关于从 URL 下载/获取文件的 SBT 任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文