writeStream

open override fun writeStream(path: Path, vararg options: OpenOption): OutputStream

Subclass API: Write a file.

This method is used to write to an arbitrary file within the embedded file-system, as a shortcut to be used outside the regular guest VM context. In this case, the write operation is considered a "host write," which is not subject to guest I/O policy restrictions.

Host writes are still subject to any policy restrictions and isolation: for example, if an embedded VFS backed by a file or jailed directory is used, the host writes are still scoped to these policies. To control host writes within the scope of the VFS system, a subclass may override this method or checkPolicy.

Return

Output stream for the file in question.

Parameters

path

Path of the file we intend to write to.

options

Open options to use when writing to the file.

Throws

IOException

if the write operation cannot be completed.

if the write operation cannot be completed because of a policy violation.