1

I'm trying to run a very simple example using Rapture.io. Not sure what I'm missing here?

scala> import rapture.io._
import rapture.io._

scala> import rapture.core._
import rapture.core._

scala> val x = File / "tmp" / "a.txt"
<console>:20: error: value / is not a member of object java.io.File
       val x = File / "tmp" / "a.txt"
                    ^

scala> import java.io.File
import java.io.File

scala> val x = File / "tmp" / "a.txt"
<console>:21: error: value / is not a member of object java.io.File
       val x = File / "tmp" / "a.txt"
                    ^

scala> 
Soumya Simanta
  • 11,523
  • 24
  • 106
  • 161

1 Answers1

2

You need to include following dependency in build.sbt

libraryDependencies += "com.propensive" %% "rapture-fs" % "0.9.1"

Where the version number (i.e. 0.9.1) should reflect the one currently available, which usually corresponds to the version of rapture-core you're using

Then, in the source code

import rapture.fs._

Do not import java.io.File. Otherwise it will create ambiguity.

See this link for more info. https://groups.google.com/forum/#!topic/rapture-users/N3-wIBKuNaA

pagoda_5b
  • 7,333
  • 1
  • 27
  • 40
amol
  • 66
  • 4