FilePath (string): The full path of the file. If the file already exists its contents will be overwritten. Environment variables in the form %variable% for windows, and $variable for non-windows operating systems will be expanded.
Text (string): The text string to be written.
Backup (bool; optional, default false ): Whether or not to backup the file prior to writing. If the file already exists, a copy of the file will be made in the same directory with the .bak suffix. If this backup file already exists, an incrementing number will be added after the extension. If a backup cannot be created, this method will return an error.
Encoding (string, optional, default "ANSI " on Android else "UTF8NOBOM " on all other platforms): File content encoding. Valid values are:
“ANSI ” “UTF8 ” – UTF8 with a byte order mark. “UTF8NOBOM ” – UTF8 without a byte order mark. “UTF16LE ” – UTF16 little endian byte order. “UTF16BE ” -UTF16 big endian byte order.
|