Read Write Files
A Path are both Input and Output objects as well as Seekable so all read/write options available through those are also possible directly on Path objects
Basic Read Write
Basic read and write options. Not all options are demonstrated so review the {/core} operations for Input,Output,Seekable etc....
import scalax.file.Path
implicit val codec = scalax.io.Codec.UTF8
// Take the first set of non-empty lines, keeping the terminator for each line
val nonEmptySpan = Path("file").lines(includeTerminator = true).
dropWhile{_.isEmpty}.
takeWhile{_.nonEmpty}
// Write result from previous read to a new file
Path("nonEmpty").writeStrings(nonEmptySpan)