C#
System.IO.File.WriteAllLines(@"C:\text.txt", new List<string>() { "New text" });
System.IO.File.WriteAllText(@"C:\text.txt", "New text");
System.IO.File.WriteAllBytes(@"C:\bytes.txt", new byte[0]);
Python
System.IO.File.WriteAllLines("C:\\text.txt", List[String](["New text"]));
System.IO.File.WriteAllText("C:\\text.txt", "New text");
System.IO.File.WriteAllBytes("C:\\bytes.txt", Array[Byte]([]));
JavaScript
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.WriteAllLines("C:\\text.txt", items);
_lib.System.IO.File.WriteAllText("C:\\text.txt", "New text");
var bytes = host.newObj(_lib.System.Collections.Generic.List(_lib.System.Byte));
_lib.System.IO.File.WriteAllBytes("C:\\bytes.txt", bytes.ToArray());