Class to manage Ascii files.
Exemple:
var file =
new GO2SAsciiFile(
'u:\\ascii.txt', GO2SFileOpen.read_write)
console.log('file content:\n' + file.
ReadAll())
console.log('file 4th line is: ' + file.
ReadLine(3))
console.log('new file content:\n' + file.
ReadAll())
Class to manage Ascii files.
Definition GO2SAsciiFile.hpp:40
Array< String > ReadAll()
Definition GO2SAsciiFile.hpp:62
Number GetLineCount()
Definition GO2SAsciiFile.hpp:53
String ReadLine(Number no)
GO2SAsciiFile(String fileName, GO2SEnum::GO2SFileOpen mode=GO2SEnum::GO2SFileOpen::read_only)
GO2SEnum::GO2SError EditLine(Number no, String newLine)
GO2SEnum::GO2SError DeleteLine(Number no)
void Close()
Close the file.
Definition GO2SFile.hpp:15
output:
file number of lines: 5
file content :
Hello World !, This is my ascii file, enjoy it !, line 4, last line
file 4th line is : line 4
new file content :
Hello World !, This is my ascii file, enjoy it !, end of file