implicit final class RichFile extends AnyVal
Pimped File class.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- RichFile
- AnyVal
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- def /(path: String): File
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def children: List[File]
- returns
a list of this file's children. Will be
Nil
if this file isn't a directory
- def deleteEventually(): Unit
Ensures that the file is deleted eventually by first trying to delete it immediately, and using
deleteOnExit
if that fails. - val file: File
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def loadFrom(stream: InputStream): Boolean
Write the contents of the
stream
into this file.Write the contents of the
stream
into this file.- stream
the source
- returns
true
on success,false
on an error
- def parent: Option[File]
- returns
this file's parent, optionally
- def pathSegments: List[String]
- def read[A](body: (InputStream) => A): A
- def readAsSource[A](body: (Source) => A)(implicit codec: Codec): A
- def readBuffered[A](body: (BufferedInputStream) => A): A
- def toString(): String
- Definition Classes
- Any
- def write(body: (OutputStream) => Unit): Boolean
Write to this file.
Write to this file.
- body
A function that takes an output stream and writes to it.
- returns
true
if everything completes normally,false
otherwise.