equal
deleted
inserted
replaced
65 libraries already built-in and also allows one to easily break up code |
65 libraries already built-in and also allows one to easily break up code |
66 into smaller modules. For example reading and writing files in |
66 into smaller modules. For example reading and writing files in |
67 Ammonite can be achieved with |
67 Ammonite can be achieved with |
68 |
68 |
69 \begin{lstlisting}[numbers=none,language=Scala] |
69 \begin{lstlisting}[numbers=none,language=Scala] |
70 scala> import ammonite.ops._ |
70 scala> import $ivy.`com.lihaoyi::os-lib:0.8.0` |
|
71 scala> import os._ |
71 |
72 |
72 scala> read(pwd / "file.name") |
73 scala> read(pwd / "file.name") |
73 res1: String = """...""" |
74 res1: String = """...""" |
74 |
75 |
75 scala> write.over(pwd / "file.name", "foo bar") |
76 scala> write.over(pwd / "file.name", "foo bar") |