Files.AddString
Overview
Adds a new text file to repository and returns created file info.
FileInfo myFiles.AddString(content: string, name: string, codePage: number)
Arguments
string content
Content of file
string name
Name of file
number codePage
Code page of string. If not specified UTF8 encoding is used.
Example
Sample Text Document
var content = '';
$Xml.SelectAll('Islemler/Islem', function() {
content += this.Evaluate('Tip') + '\t' + this.Evaluate('Tutar') + '\n';
});
content += '\r';
var odemeDosyasi;
// encodes in utf-8 by default
odemeDosyasi = $Files.AddString(content, 'OdemeTalimati.txt');
// 65001 is also the codepage for utf-8
odemeDosyasi = $Files.AddString(content, 'OdemeTalimati.txt', '65001');
Copyright © 2010 - 2023 Emakin. All rights reserved.