4D v19file.getText |
||||||||||||||||||||||||||
|
4D v19
file.getText
|
Konstante | Typ | Wert | Kommentar |
Document unchanged | Lange Ganzzahl | 0 | Keine Bearbeitung |
Document with native format | Lange Ganzzahl | 1 | (Standard) Zeilenumbrüche werden in das native Format des Betriebssystems konvertiert: CR (carriage return auf Mac OS), CRLF (carriage return + line feed unter Windows) |
Document with CRLF | Lange Ganzzahl | 2 | Zeilenumbrüche werden in das Windows Format konvertiert: CRLF (carriage return + line feed) |
Document with CR | Lange Ganzzahl | 3 | Zeilenumbrüche werden in das Mac OS Format konvertiert: CR (carriage return) |
Document with LF | Lange Ganzzahl | 4 | Zeilenumbrüche werden in das Unix Format konvertiert: LF (line feed) |
Standardmäßig, also ohne den Parameter breakMode werden Zeilenenden im native Modus (1) bearbeitet.
Zurückgegebener Wert
Text des File.
Vorgegeben ist folgendes Textdokument (Felder sind durch Tabs getrennt):
id name price vat
3 thé 1.06€ 19.6
2 café 1.05€ 19.6
Führen Sie diesen Code aus:
$myFile:=Folder(fk documents folder).file("Billing.txt") //standardmäßig UTF-8
$txt:=$myFile.getText()
... erhalten Sie:
// $Text = "id name price vat\r\n3 thé 1.06€\t19.6\r\n2\tcafé\t1.05€\t19.6"
// \t = tab
// \r = CR
Produkt: 4D
Thema: File und Folder
4D Programmiersprache ( 4D v19)
4D Programmiersprache ( 4D v19.1)