Object - io : WritableCSVChannel

Represents a WritableCSVChannel, which could be used to write records from the CSV file.

Constructor

__init

(WritableCharacterChannel characterChannel, Separator fs)

  • fs Separator ,
  • Field separator, which will separate the records in the CSV

Methods

Writes the record to a given CSV file.
Closes a given CSVChannel.

write

(string[] csvRecord)

returns Error?

Writes the record to a given CSV file.

 io:Error err = csvChannel.write(record);

Parameters

  • csvRecord string[]
  • A record to be written to the channel

  • Return Type

    (Error?)
  • An io:Error if the record could not be written properly

close

()

returns Error?

Closes a given CSVChannel.

 io:Error? err = csvChannel.close();

  • Return Type

    (Error?)
  • () or else io:Error if any error occurred