File.Save (gb)

Static Sub Save ( FileName As String, Data As String )

Saves the contents of a string into a file.

This example shows how save can be used as a easy way to save the content of a TextArea to a text file.

Examples

PUBLIC SUB ButtonSave_Click()
  Dialog.Filter = ["*.txt", "Text Files"]
  IF Dialog.SaveFile() THEN RETURN
  File.Save(Dialog.Path, TextAreaEdit.Text)
CATCH
  Message.Info(Error.Text)
END

The text file could have been opened using the File.Load method.