open

expect abstract fun open(accessor: DataAccessor): T(source)

Opens and parses a file from the given data accessor.

Return

A new file instance

Parameters

accessor

The data accessor that provides access to the file content

Throws

if the file format is invalid or unsupported

if an I/O error occurs


expect open fun open(bytes: ByteArray): T(source)

Opens and parses a file from the given bytes.

Return

A new file instance

Parameters

bytes

The bytes that represent the file content

Throws

if the file format is invalid or unsupported


expect open fun open(path: String): T(source)

Opens and parses a file from the given path.

Note: The behavior of this method may vary across different platforms, depending on how file paths are resolved and accessed.

Return

A new file instance

Parameters

path

The path to the file

Throws

if the file format is invalid or unsupported

if an I/O error occurs

if the platform does not support file access

open fun open(path: Path): T(source)

Opens and parses a file from the given path.

Return

A new file instance

Parameters

path

The path to the file

See also

Throws

if the file format is invalid or unsupported

if an I/O error occurs

if the file does not exist


open fun open(file: File): T(source)

Opens and parses a file from the given file.

Return

A new file instance

Parameters

file

The file to open

Throws

if the file format is invalid or unsupported

if an I/O error occurs

if the file does not exist


open fun open(channel: SeekableByteChannel): T(source)

Opens and parses a file from the given channel.

The channel will be closed after the file is closed.

Return

A new file instance

Parameters

channel

The channel to open

Throws

if the file format is invalid or unsupported

if an I/O error occurs


actual abstract fun open(accessor: DataAccessor): T(source)

Opens and parses a file from the given data accessor.

Return

A new file instance

Parameters

accessor

The data accessor that provides access to the file content

Throws

if the file format is invalid or unsupported

if an I/O error occurs


actual open fun open(bytes: ByteArray): T(source)

Opens and parses a file from the given bytes.

Return

A new file instance

Parameters

bytes

The bytes that represent the file content

Throws

if the file format is invalid or unsupported


actual open fun open(path: String): T(source)

Opens and parses a file from the given path.

Note: The behavior of this method may vary across different platforms, depending on how file paths are resolved and accessed.

Return

A new file instance

Parameters

path

The path to the file

See also

Throws

if the file format is invalid or unsupported

if an I/O error occurs

if the platform does not support file access

if the path string cannot be converted to a Path

if the file does not exist

actual open fun open(bytes: ByteArray): T(source)

Opens and parses a file from the given bytes.

Return

A new file instance

Parameters

bytes

The bytes that represent the file content

Throws

CommonFileException

if the file format is invalid or unsupported


actual open fun open(path: String): T(source)

Opens and parses a file from the given path.

Note: The behavior of this method may vary across different platforms, depending on how file paths are resolved and accessed.

Return

A new file instance

Parameters

path

The path to the file

Throws

if the platform does not support file access

CommonFileException

if the file format is invalid or unsupported

IOException

if an I/O error occurs


actual abstract fun open(accessor: <Error class: unknown class>): T(source)

Opens and parses a file from the given data accessor.

Return

A new file instance

Parameters

accessor

The data accessor that provides access to the file content

Throws

CommonFileException

if the file format is invalid or unsupported

IOException

if an I/O error occurs

actual abstract fun open(accessor: DataAccessor): T(source)

Opens and parses a file from the given data accessor.

Return

A new file instance

Parameters

accessor

The data accessor that provides access to the file content

Throws

if the file format is invalid or unsupported

if an I/O error occurs


actual open fun open(bytes: ByteArray): T(source)

Opens and parses a file from the given bytes.

Return

A new file instance

Parameters

bytes

The bytes that represent the file content

Throws

if the file format is invalid or unsupported


actual open fun open(path: String): T(source)

Opens and parses a file from the given path.

Note: The behavior of this method may vary across different platforms, depending on how file paths are resolved and accessed.

Return

A new file instance

Parameters

path

The path to the file

Throws

if the file format is invalid or unsupported

if an I/O error occurs

if the platform does not support file access

actual abstract fun open(accessor: DataAccessor): T(source)

Opens and parses a file from the given data accessor.

Return

A new file instance

Parameters

accessor

The data accessor that provides access to the file content

Throws

if the file format is invalid or unsupported

if an I/O error occurs


actual open fun open(bytes: ByteArray): T(source)

Opens and parses a file from the given bytes.

Return

A new file instance

Parameters

bytes

The bytes that represent the file content

Throws

if the file format is invalid or unsupported


actual open fun open(path: String): T(source)

Opens and parses a file from the given path.

Note: The behavior of this method may vary across different platforms, depending on how file paths are resolved and accessed.

Return

A new file instance

Parameters

path

The path to the file

Throws

if the file format is invalid or unsupported

if an I/O error occurs

if the platform does not support file access

actual abstract fun open(accessor: DataAccessor): T(source)

Opens and parses a file from the given data accessor.

Return

A new file instance

Parameters

accessor

The data accessor that provides access to the file content

Throws

if the file format is invalid or unsupported

if an I/O error occurs


actual open fun open(bytes: ByteArray): T(source)

Opens and parses a file from the given bytes.

Return

A new file instance

Parameters

bytes

The bytes that represent the file content

Throws

if the file format is invalid or unsupported


actual open fun open(path: String): T(source)

Opens and parses a file from the given path.

Note: The behavior of this method may vary across different platforms, depending on how file paths are resolved and accessed.

Return

A new file instance

Parameters

path

The path to the file

Throws

if the file format is invalid or unsupported

if an I/O error occurs

if the platform does not support file access