object write
Write some data to a file. This can be a String, an Array[Byte], or a Seq[String] which is treated as consecutive lines. By default, this fails if a file already exists at the target location. Use write.over or write.append if you want to over-write it or add to what's already there.
- Alphabetic
- By Inheritance
- write
- 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 apply(target: Path, data: Source, perms: PermSet = null, createFolders: Boolean = false): Unit
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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()
- def outputStream(target: Path, perms: PermSet = null, createFolders: Boolean = false, openOptions: Seq[OpenOption] = Seq(CREATE, WRITE)): OutputStream
Open a java.io.OutputStream to write to the given file
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- 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()
- def write(target: Path, data: Source, flags: Seq[StandardOpenOption], perms: PermSet, offset: Long): AnyVal
Performs the actual opening and writing to a file.
Performs the actual opening and writing to a file. Basically cribbed from
java.nio.file.Files.write
so we could re-use it properly for different combinations of flags and all sorts of Sources - object append
Identical to write, except if the file already exists, appends to the file instead of error-ing out
- object channel extends (Path) => SeekableByteChannel
Opens a SeekableByteChannel to write to the given file.
- object over
Similar to os.write, except if the file already exists this over-writes the existing file contents.
Similar to os.write, except if the file already exists this over-writes the existing file contents. You can also pass in
truncate = false
to avoid truncating the file if the new contents is shorter than the old contents, and anoffset
to the file you want to write to.