LibOFX
file_preproc.cpp File Reference

File type detection, etc. More...

Go to the source code of this file.

Functions

const char * libofx_get_file_format_description (const struct LibofxFileFormatInfo format_list[], enum LibofxFileFormat file_format)
enum LibofxFileFormat libofx_get_file_format_from_str (const struct LibofxFileFormatInfo format_list[], const char *file_type_string)
int libofx_proc_file (LibofxContextPtr p_libofx_context, const char *p_filename, LibofxFileFormat p_file_type)
enum LibofxFileFormat libofx_detect_file_type (const char *p_filename)
 libofx_detect_file_type tries to analyze a file to determine it's format.

Variables

const unsigned int READ_BUFFER_SIZE = 1024

Detailed Description

File type detection, etc.

Implements AutoDetection of file type, and handoff to specific parsers.

Definition in file file_preproc.cpp.

Function Documentation

◆ libofx_detect_file_type()

enum LibofxFileFormat libofx_detect_file_type ( const char * p_filename)

libofx_detect_file_type tries to analyze a file to determine it's format.

Parameters
p_filenameFile name of the file to process
Returns
Detected file format, UNKNOWN if unsuccessful.

Definition at line 100 of file file_preproc.cpp.

◆ libofx_get_file_format_description()

const char * libofx_get_file_format_description ( const struct LibofxFileFormatInfo format_list[],
enum LibofxFileFormat file_format )

Definition at line 36 of file file_preproc.cpp.

◆ libofx_get_file_format_from_str()

enum LibofxFileFormat libofx_get_file_format_from_str ( const struct LibofxFileFormatInfo format_list[],
const char * file_type_string )

Definition at line 53 of file file_preproc.cpp.

◆ libofx_proc_file()

int libofx_proc_file ( LibofxContextPtr p_libofx_context,
const char * p_filename,
LibofxFileFormat p_file_type )

Definition at line 66 of file file_preproc.cpp.

Variable Documentation

◆ READ_BUFFER_SIZE

const unsigned int READ_BUFFER_SIZE = 1024

Definition at line 31 of file file_preproc.cpp.