9#ifndef __WTAP_FILE_WRAPPERS_H__
10#define __WTAP_FILE_WRAPPERS_H__
16extern FILE_T file_open(
const char *path);
17extern FILE_T file_fdopen(
int fildes);
18extern void file_set_random_access(
FILE_T stream,
bool random_flag, GPtrArray *seek);
44extern int file_fstat(
FILE_T stream, ws_statb64 *statb,
int *err);
134extern void file_fdclose(
FILE_T file);
135extern bool file_fdreopen(
FILE_T file,
const char *path);
136extern void file_close(
FILE_T file);
WS_DLL_PUBLIC bool file_iscompressed(FILE_T stream)
Check if file is compressed.
Definition file_wrappers.c:2112
WS_DLL_PUBLIC int file_error(FILE_T fh, char **err_info)
Check for file error.
Definition file_wrappers.c:2379
WS_DLL_PUBLIC char * file_getsp(char *buf, int len, FILE_T stream)
Read a line from the file, skipping leading whitespace.
Definition file_wrappers.c:2287
WS_DLL_PUBLIC bool file_eof(FILE_T stream)
Check for end-of-file.
Definition file_wrappers.c:2367
WS_DLL_PUBLIC char * file_gets(char *buf, int len, FILE_T stream)
Read a line from the file.
Definition file_wrappers.c:2360
WS_DLL_PUBLIC int file_getc(FILE_T stream)
Read the next byte from the file.
Definition file_wrappers.c:2262
WS_DLL_PUBLIC int64_t file_tell(FILE_T stream)
Get current position in the file.
Definition file_wrappers.c:2088
WS_DLL_PUBLIC int file_read(void *buf, unsigned int count, FILE_T file)
Read bytes from a file.
Definition file_wrappers.c:2151
WS_DLL_PUBLIC int64_t file_seek(FILE_T stream, int64_t offset, int whence, int *err)
Seek to a position in the file.
Definition file_wrappers.c:1725
WS_DLL_PUBLIC int file_peekc(FILE_T stream)
Peek the next byte from the file without advancing the position.
Definition file_wrappers.c:2215
Definition file_wrappers.c:97