readStream

abstract fun readStream(path: Path, vararg options: OpenOption): InputStream

Subclass API: Read a file.

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

Host reads 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 reads are still scoped to these policies. To control host reads within the scope of the VFS system, a subclass may override this method or checkPolicy.

Return

Input stream for the file in question.

Parameters

path

Path of the file to read.

options

Open options to use when reading the file.

Throws

if the read operation cannot be completed.

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