9 #ifndef __WTAP_FILE_WRAPPERS_H__ 10 #define __WTAP_FILE_WRAPPERS_H__ 14 #include <wsutil/file_util.h> 15 #include "ws_symbol_export.h" 17 extern FILE_T file_open(
const char *path);
18 extern FILE_T file_fdopen(
int fildes);
19 extern void file_set_random_access(
FILE_T stream, gboolean random_flag, GPtrArray *seek);
20 WS_DLL_PUBLIC gint64 file_seek(
FILE_T stream, gint64 offset,
int whence,
int *err);
23 extern int file_fstat(
FILE_T stream, ws_statb64 *statb,
int *err);
25 WS_DLL_PUBLIC
int file_read(
void *buf,
unsigned int count,
FILE_T file);
28 WS_DLL_PUBLIC
char *file_gets(
char *buf,
int len,
FILE_T stream);
29 WS_DLL_PUBLIC
char *file_getsp(
char *buf,
int len,
FILE_T stream);
31 WS_DLL_PUBLIC
int file_error(
FILE_T fh, gchar **err_info);
33 extern void file_fdclose(
FILE_T file);
34 extern int file_fdreopen(
FILE_T file,
const char *path);
35 extern void file_close(
FILE_T file);
38 typedef struct wtap_writer *GZWFILE_T;
40 extern GZWFILE_T gzwfile_open(
const char *path);
41 extern GZWFILE_T gzwfile_fdopen(
int fd);
42 extern guint gzwfile_write(GZWFILE_T state,
const void *buf, guint len);
43 extern int gzwfile_flush(GZWFILE_T state);
44 extern int gzwfile_close(GZWFILE_T state);
45 extern int gzwfile_geterr(GZWFILE_T state);
Definition: file_wrappers.c:78