9#ifndef __WTAP_FILE_WRAPPERS_H__
10#define __WTAP_FILE_WRAPPERS_H__
104WS_DLL_PUBLIC
int file_read(
void *buf,
unsigned int count,
FILE_T file);
WS_DLL_PUBLIC bool file_iscompressed(FILE_T stream)
Check if file is compressed.
Definition file_wrappers.c:2111
int file_fstat(FILE_T stream, ws_statb64 *statb, int *err)
Get file status information.
Definition file_wrappers.c:2100
WS_DLL_PUBLIC int file_error(FILE_T fh, char **err_info)
Check for file error.
Definition file_wrappers.c:2378
WS_WARN_UNUSED 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:1724
void file_fdclose(FILE_T file)
Close a file stream.
Definition file_wrappers.c:2397
void file_set_random_access(FILE_T stream, bool random_flag, GPtrArray *seek)
Set random access flag for a file stream.
Definition file_wrappers.c:1718
int64_t file_tell_raw(FILE_T stream)
Get current raw position in the file.
Definition file_wrappers.c:2094
WS_DLL_PUBLIC char * file_getsp(char *buf, int len, FILE_T stream)
Read a line from the file, returning a pointer to the end.
Definition file_wrappers.c:2286
WS_DLL_PUBLIC bool file_eof(FILE_T stream)
Check for end-of-file.
Definition file_wrappers.c:2366
WS_DLL_PUBLIC char * file_gets(char *buf, int len, FILE_T stream)
Read a line from the file.
Definition file_wrappers.c:2359
FILE_T file_open(const char *path)
Open a file for reading or writing.
Definition file_wrappers.c:1666
WS_DLL_PUBLIC int file_getc(FILE_T stream)
Read the next byte from the file.
Definition file_wrappers.c:2261
WS_DLL_PUBLIC int64_t file_tell(FILE_T stream)
Get current position in the file.
Definition file_wrappers.c:2087
WS_DLL_PUBLIC int file_read(void *buf, unsigned int count, FILE_T file)
Read bytes from a file.
Definition file_wrappers.c:2150
void file_close(FILE_T file)
Close a file stream.
Definition file_wrappers.c:2416
WS_DLL_PUBLIC int file_peekc(FILE_T stream)
Peek the next byte from the file without advancing the position.
Definition file_wrappers.c:2214
bool file_fdreopen(FILE_T file, const char *path)
Reopens a file descriptor for reading.
Definition file_wrappers.c:2405
void file_clearerr(FILE_T stream)
Clear error and end-of-file indicators for a file stream.
Definition file_wrappers.c:2388
FILE_T file_fdopen(int fildes)
Open a file descriptor for reading or writing.
Definition file_wrappers.c:1480
Definition file_wrappers.c:96