![]() |
Oyranos
git-devel
Oyranos is a full featured Color Management System
|
File I/O. More...
|
Typedefs | |
| typedef int(* | oyjlFileNameCheck_f) (const char **full_filename, int write_size) |
| custom file name checker function type More... | |
Functions | |
| char * | oyjlReadFileStreamToMem (FILE *fp, int *size) |
| read FILE into memory More... | |
| char * | oyjlReadFileP (FILE *fp, int *size_ptr, void *(*alloc)(size_t), const char *file_name) |
| Read a local FILE pointer to memory. More... | |
| FILE * | oyjlFopen (const char *file_name, const char *mode) |
| wrapper for fopen() More... | |
| char * | oyjlReadFile (const char *file_name, int flags, int *size_ptr) |
| read local file into memory More... | |
| int | oyjlHasApplication (const char *app_name) |
| detect program More... | |
| char * | oyjlReadCommandF (int *size, const char *mode, void *(*alloc)(size_t), const char *format,...) |
| Read a stream from shell command. More... | |
| int | oyjlReadFunction (int argc, const char **argv, int(*callback)(int argc, const char **argv), void *(*alloc)(size_t), int *size_stdout, char **data_stdout, int *size_stderr, char **data_stderr) |
| Read a stream from a function. More... | |
| int | oyjlWriteFile (const char *filename, const void *mem, int size) |
| write memory to FILE More... | |
File I/O.
Basic C FILE input and output is provided by oyjlWriteFile(), oyjlReadFile() and oyjlReadFileStreamToMem().
| typedef int(* oyjlFileNameCheck_f) (const char **full_filename, int write_size) |
custom file name checker function type
This function allows to implement file i/o access policies for the oyjlReadFile(), oyjlWriteFile() and oyjlIsFile() funtions.
| [in,out] | filename | filename can be replaced |
| [in] | size | is write file size otherwise read from |
| FILE * oyjlFopen | ( | const char * | file_name, |
| const char * | mode | ||
| ) |
wrapper for fopen()
| int oyjlHasApplication | ( | const char * | app_name | ) |
detect program
Search for a command in the executeable path. It resembles 'which'.
| [in] | app_name | application name withou path |
| char* oyjlReadCommandF | ( | int * | size, |
| const char * | mode, | ||
| void *(*)(size_t) | alloc, | ||
| const char * | format, | ||
| ... | |||
| ) |
Read a stream from shell command.
param[in] mode Is passed to popen. optional; Can contain dot '.' separated attributes:
References oyjlStringCopy().
| char * oyjlReadFile | ( | const char * | file_name, |
| int | flags, | ||
| int * | size_ptr | ||
| ) |
read local file into memory
uses malloc()
| char * oyjlReadFileP | ( | FILE * | fp, |
| int * | size_ptr, | ||
| void *(*)(size_t) | alloc, | ||
| const char * | file_name | ||
| ) |
Read a local FILE pointer to memory.
Referenced by oyjlReadFunction().
| char* oyjlReadFileStreamToMem | ( | FILE * | fp, |
| int * | size | ||
| ) |
read FILE into memory
allocators are malloc()/realloc()
| int oyjlReadFunction | ( | int | argc, |
| const char ** | argv, | ||
| int(*)(int argc, const char **argv) | callback, | ||
| void *(*)(size_t) | alloc, | ||
| int * | size_stdout, | ||
| char ** | data_stdout, | ||
| int * | size_stderr, | ||
| char ** | data_stderr | ||
| ) |
| int oyjlWriteFile | ( | const char * | filename, |
| const void * | mem, | ||
| int | size | ||
| ) |
write memory to FILE
1.8.13