Skip to main content
Glama
read.md614 B
# Read ## `read` Reads plain text or data from a file. By default, the file will be read as UTF-8 and returned as a [string]($str). If you specify `{encoding: none}`, this returns raw [bytes] instead. # Example ```example An example for a HTML file: \ #let text = read("example.html") #raw(text, lang: "html") Raw bytes: #read("tiger.jpg", encoding: none) ``` ## Parameters ### path *(required)* Path to a file. For more details, see the [Paths section]($syntax/#paths). ### encoding The encoding to read the file with. If set to `{none}`, this function returns raw bytes. ## Returns - str, bytes

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/FujishigeTemma/typst-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server