type

LibFiles

@Js
const mixin LibFiles

Access to file resources packaged with library.

methods

isSupported

Return if this API is supported, will be false in browser environments.

list

List resource files in this library.

read

Look up a resource file in this library and read via callback function.

readBuf

Convenience to read file to in-memory buffer

readStr

Convenience to read file to in-memory string

Slot Details

isSupported

abstract Bool isSupported()

Return if this API is supported, will be false in browser environments.

list

abstract Uri[] list()

List resource files in this library.

read

abstract Void read(Uri uri, |Err?,InStream?| f)

Look up a resource file in this library and read via callback function. The URI must be path absolute.

readBuf

abstract Buf readBuf(Uri uri)

Convenience to read file to in-memory buffer

readStr

abstract Str readStr(Uri uri)

Convenience to read file to in-memory string