Summary
August 28, 2017 ยท View on GitHub
| Members | Descriptions |
|---|---|
void write_chain_to_file(Chain chain,Chain filename) | Set file contents to chain's contents |
void read_file_to_chain(Chain * chain,Chain filename) | Set chain contents to file's contents |
FILE * open_file_as_stream(Chain filename,const char * mode) | Open file as a stream |
Members
void write_chain_to_file(Chain chain,Chain filename)
Set file contents to chain's contents
Open a file and set its contents to that of the chain's. As with other functions, each fraction is converted to a char. An error will be thrown upon any problem opening the file
Parameters
-
chainThe chain being read -
filenameA chain holding the filename of the file we're opening
void read_file_to_chain(Chain * chain,Chain filename)
Set chain contents to file's contents
Open a file and read its contents to the chain's, replacing any previous values(an assign, not append). As with other functions, each char is converted to a fraction. An error will be thrown upon any problem opening the file
Parameters
-
chainThe chain being overwritten -
filenameA chain holding the filename of the file we're opening
FILE * open_file_as_stream(Chain filename,const char * mode)
Open file as a stream
Use a filename encoded in a chain to return a stream pointing to a file of that name, with a particular mode.
Parameters
-
filenameA chain holding the filename of the file we're opening -
modeThe fopen mode
Returns
The file as a stream
Generated by Moxygen