Skip to content

FS.ReadText

boxgaming edited this page Jul 5, 2026 · 3 revisions

Returns the full contents of a text file as a string.
Available in release 0.11.0

Syntax

fileContent$ = FS.ReadText (filepath$)

Parameters

  • The filepath$ parameter indicates the path to the file whose contents should be read.

Examples

Example: Print the full contents of a given file.

Import FS From "lib/io/fs.bas"

Dim content As String
content = FS.ReadText("README.txt")

Print content

See Also

FS.WriteText

Clone this wiki locally