我要在 scala 中复制一个文件,但出现 FileNotFound 错误,资产文件夹位于 src 所在的同一目录中:
val src = new File("/assets/public/images/default/male.jpg")
val dest = new File("/assets/public/images/profile/male1.jpg")
new FileOutputStream(dest) getChannel() transferFrom(
new FileInputStream(src) getChannel, 0, Long.MaxValue )