Seekable
Seekable permits random access read and write
Positioning Examples
When writing, the unit of the position parameter is not always in bytes. Rather it is determined by by what type of data is being written.
For example if a string is being written then the position refers to the position in characters.
import scalax.io._
// see codec example for why codec is required
implicit val codec = Codec.UTF8
val someFile: Seekable = Resource.fromFileString("someFile")
// "people" is being written after the 6th character
someFile.patch(6, "people",OverwriteAll)
// 1,2,3 is being written after the 8th byte (2nd integer)
someFile.insert(2,List(1,2,3))
// 1,2,3 is being written after the 2nd byte
someFile.insert(2,List[Byte](1,2,3))