API Reference › Fs › Fs.append_text
method

Fs.append_text

Fs.append_text(p, s) -> bool

Appends a string to the end of a file, creating it if necessary. Returns true on success. Handy for logs and event journals.

Parameters

pthe path
sthe string to append

Example

program AppendText {
  entry {
    if Fs.append_text("run.log", "started\n") { print(1) }
  }
}
← All symbols