(Formerly known as FileWrite, which is now obsolete)
File.WriteString(string text)
Writes TEXT to the file, which must have been previously opened with
File.Open for writing. The string is written using a custom format to
the file, which can only be read back by using File.ReadStringBack.
Example:
File *output = File.Open("temp.tmp", eFileWrite);
if (output == null) Display("Error opening file.");
else {
output.WriteString("test string");
output.Close();
}
will open the file temp.tmp for writing. If it cannot create the file, it will display
an error message. Otherwise, it will write the string "test string" and close it.
See Also: File.ReadStringBack, File.Open,
File.WriteRawLine
|