scidart_io library

Functions

readCSV(String fileName, {String delimiter = ';', int skipHeader = 0, int skipFooter = 0, bool convertToArray2d = false, Encoding encoding = utf8}) Future
Read a CSV file and return a List where each element is a row of the file fileName : file name baseDir : optional, base directory to the file, if not informed, get current script path. delimiter : optional, string used to separate values, by default is ";" skipHeader : optional, the number of lines to skip at the beginning of the file, default is 0 skipFooter : optional, the number of lines to skip at the end of the file, default is 0 convertToArray2d : optional, try convert the dynamic list to a Array2d list, if don't have success, throw a exception, default is false. The conditions to a success conversion is: all the information read in the csv file has to be parseble to a number. If you have header or footer, use skipHeader or skipFooter parameters to ignore this info from conversion. encoding : optional, the encoding of the file, default is utf8 Return a List
readLinesTxt(String fileName, {Encoding encoding = utf8}) Future<List>
Read a TXT file and return a List where each element is line of the file fileName : file name or path of the file baseDir : optional, base directory to the file, if not informed, get current script path. encoding : optional, the encoding of the file, default is utf8 Examples
readTxt(String fileName, {Encoding encoding = utf8}) Future<String>
Read a TXT file and return a String with file content fileName : file name or path of the file baseDir : optional, base directory to the file, if not informed, get current script path. encoding : optional, the encoding of the file, default is utf8 Examples
writeLinesCSV(Array2d data, String fileName, {String delimiter = ';', Encoding encoding = utf8, FileMode mode = FileMode.write}) Future<void>
Write a list of line in a TXT file data : a list where each line is a string that will be written in the file fileName : file name or path of the file baseDir : optional, base directory to the file, if not informed, get current script path. delimiter : optional, string used to separate values, by default is ";" encoding : optional, the encoding of the file, default is utf8 mode : optional, the mode how the program will write the file:
writeLinesTxt(List<String> lines, String fileName, {Encoding encoding = utf8, FileMode mode = FileMode.write}) Future<void>
Write a list of line in a TXT file lines : a list where each line is a string that will be written in the file fileName : file name or path of the file baseDir : optional, base directory to the file, if not informed, get current script path. encoding : optional, the encoding of the file, default is utf8 mode : optional, the mode how the program will write the file:
writeTxt(String text, String fileName, {Encoding encoding = utf8, FileMode mode = FileMode.write}) Future<void>
Write a string in a TXT file text : the string that will be written in the file fileName : file name or path of the file baseDir : optional, base directory to the file, if not informed, get current script path. encoding : optional, the encoding of the file, default is utf8 mode : optional, the mode how the program will write the file: