fusion/asset

Values

pub fn read(path: String) -> Result(BitArray, String)

Read an asset as BitArray.

On Node/Bun/Deno, reads from filesystem relative to current directory. On Cloudflare Workers, reads from embedded assets.mjs.

pub fn read_string(path: String) -> Result(String, String)

Read an asset as String.

Convenience function that reads and converts to string.

Search Document