protocol
csv_protocol¶
CSV files reading and writing protocol.
staticPublic predicates¶
read_file/3¶
Reads a CSV file saving the data as clauses for the specified object predicate. Fails if the file cannot be parsed.
staticread_file(File,Object,Predicate)read_file(+atom,+object_identifier,+predicate_indicator) - zero_or_oneread_file/2¶
Reads a CSV file returning the data as a list of rows, each row a list of fields. Fails if the file cannot be parsed.
staticread_file(File,Rows)read_file(+atom,-list(list)) - zero_or_oneread_file_by_line/3¶
Reads a CSV file saving the data as clauses for the specified object predicate. The file is read line by line. Fails if the file cannot be parsed.
staticread_file_by_line(File,Object,Predicate)read_file_by_line(+atom,+object_identifier,+predicate_indicator) - zero_or_oneread_file_by_line/2¶
Reads a CSV file returning the data as a list of rows, each row a list of fields. The file is read line by line. Fails if the file cannot be parsed.
staticread_file_by_line(File,Rows)read_file_by_line(+atom,-list(list)) - zero_or_onewrite_file/3¶
Writes a CSV file with the data represented by the clauses of the specified object predicate.
staticwrite_file(File,Object,Predicate)write_file(+atom,+object_identifier,+predicate_indicator) - oneguess_separator/2¶
Guesses the separator used in a given file, asking the user to confirm.
staticguess_separator(File,Separator)guess_separator(+atom,-atom) - oneguess_arity/2¶
Guesses the arity of records in a given file, asking the user to confirm.
staticguess_arity(File,Arity)guess_arity(+atom,-number) - oneProtected predicates¶
(none)
Private predicates¶
(none)