Links

Добавить строку

Компонент, добавляющий строку в конец файла.
Свойство
Тип
Описание
Кодировка
String
Кодировка, используемая в файле (utf-8) 'https://docs.microsoft.com/ru-ru/dotnet/api/system.text.encoding'
Путь к файлу*
String
Путь к файлу для записи (c:\folder\file.txt)
Текст*
String
Текст записываемой строки
C#
Python
JavaScript
System.IO.File.AppendAllLines(@"C:\text.txt", new List<string>() { "New text" });
System.IO.File.AppendAllText(@"C:\text.txt", "New text");
System.IO.File.AppendAllLines("C:\\text.txt", List[String](["New text"]))
System.IO.File.AppendAllText("C:\\text.txt", "New text")
var host = new _lib.Microsoft.ClearScript.HostFunctions();
var items = host.newObj(_lib.System.Collections.Generic.List(_lib.System.String));
items.Add("New text");
_lib.System.IO.File.AppendAllLines("C:\\text.txt", items);
_lib.System.IO.File.AppendAllText("C:\\text.txt", "New text");