caca_file(3caca) | libcaca | caca_file(3caca) |
caca_file - libcaca file IO
libcaca importers/exporters from/to various
__extern caca_file_t * caca_file_open (char const *,
const char *)
Open a file for reading or writing. __extern int caca_file_close
(caca_file_t *)
Close a file handle. __extern uint64_t caca_file_tell
(caca_file_t *)
Return the position in a file handle. __extern size_t caca_file_read
(caca_file_t *, void *, size_t)
Read data from a file handle. __extern size_t caca_file_write
(caca_file_t *, const void *, size_t)
Write data to a file handle. __extern char * caca_file_gets
(caca_file_t *, char *, int)
Read a line from a file handle. __extern int caca_file_eof
(caca_file_t *)
Tell whether a file handle reached end of file.
These functions allow to read and write files in a platform-independent way.
Create a caca file handle for a file. If the file is zipped, it is decompressed on the fly.
If an error occurs, NULL is returned and errno is set accordingly:
Parameters
Returns
Referenced by caca_import_canvas_from_file().
Close and destroy the resources associated with a caca file handle.
This function is a wrapper for fclose() or, if available, gzclose().
Parameters
Returns
Referenced by caca_import_canvas_from_file().
Return the file handle position, in bytes.
Parameters
Returns
Read data from a file handle and copy them into the given buffer.
Parameters
Returns
Referenced by caca_import_canvas_from_file().
Write the contents of the given buffer to the file handle.
Parameters
Returns
Read one line of data from a file handle, up to one less than the given number of bytes. A trailing zero is appended to the data.
Parameters
Returns
Return the end-of-file status of the file handle.
This function is a wrapper for feof() or, if available, gzeof().
Parameters
Returns
Referenced by caca_import_canvas_from_file().
Generated automatically by Doxygen for libcaca from the source code.
Tue Jul 12 2022 | Version 0.99.beta20 |