object read extends (ReadablePath) => String
Reads the contents of a os.Path or other os.Source as a
java.lang.String
. Defaults to reading the entire file as UTF-8, but you can
also select a different charSet
to use, and provide an offset
/count
to
read from if the source supports seeking.
- Alphabetic
- By Inheritance
- read
- Function1
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def andThen[A](g: (String) => A): (ReadablePath) => A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- def apply(arg: Path, charSet: Codec = java.nio.charset.StandardCharsets.UTF_8, offset: Long = 0, count: Int = Int.MaxValue): String
- def apply(arg: ReadablePath, charSet: Codec): String
- def apply(arg: ReadablePath): String
- Definition Classes
- read → Function1
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def compose[A](g: (A) => ReadablePath): (A) => String
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Function1 → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- object bytes extends (ReadablePath) => Array[Byte]
Reads the contents of a os.Path or os.Source as an
Array[Byte]
; you can provide anoffset
/count
to read from if the source supports seeking. - object channel extends (Path) => SeekableByteChannel
Opens a SeekableByteChannel to read from the given file.
- object chunks
Reads the contents of the given os.Path in chunks of the given size; returns a generator which provides a byte array and an offset into that array which contains the data for that chunk.
Reads the contents of the given os.Path in chunks of the given size; returns a generator which provides a byte array and an offset into that array which contains the data for that chunk. All chunks will be of the given size, except for the last chunk which may be smaller.
Note that the array returned by the generator is shared between each callback; make sure you copy the bytes/array somewhere else if you want to keep them around.
Optionally takes in a provided input
buffer
instead of achunkSize
, allowing you to re-use the buffer between invocations. - object inputStream extends (ReadablePath) => InputStream
Opens a java.io.InputStream to read from the given file
- object lines extends (ReadablePath) => IndexedSeq[String]
Reads the given os.Path or other os.Source as a string and splits it into lines; defaults to reading as UTF-8, which you can override by specifying a
charSet
. - object stream extends (ReadablePath) => Readable