Skip to content

FS.WriteText

boxgaming edited this page Jul 5, 2026 · 2 revisions

Writes a string of text to a given file.
Available in release 0.11.0

Syntax

FS.WriteText filename$, text$

Parameters

  • The filename$ parameter indicates the path to the file whose contents should be written. If the file does not exist it will be created.
  • The text$ parameter indicates the text content to write to the file.

Examples

Example: Write a string of text to a specified file.

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

Dim content As String
content = "This is the file content."

FS.WriteText "test.txt", content

See Also

FS.ReadText

Clone this wiki locally