9#ifndef __WTAP_FILE_WRAPPERS_H__
10#define __WTAP_FILE_WRAPPERS_H__
52WS_WARN_UNUSED WS_DLL_PUBLIC int64_t
file_seek(FILE_T
stream, int64_t offset,
int whence,
int *err);
104WS_DLL_PUBLIC
int file_read(
void *buf,
unsigned int count, FILE_T file);
170WS_DLL_PUBLIC
int file_error(FILE_T fh,
char **err_info);
WS_DLL_PUBLIC bool file_iscompressed(FILE_T stream)
Check if file is compressed.
Definition file_wrappers.c:2142
int file_fstat(FILE_T stream, ws_statb64 *statb, int *err)
Get file status information.
Definition file_wrappers.c:2131
WS_DLL_PUBLIC int file_error(FILE_T fh, char **err_info)
Check for file error.
Definition file_wrappers.c:2409
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:1732
void file_fdclose(FILE_T file)
Close a file stream.
Definition file_wrappers.c:2428
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:1726
int64_t file_tell_raw(FILE_T stream)
Get current raw position in the file.
Definition file_wrappers.c:2125
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:2317
WS_DLL_PUBLIC bool file_eof(FILE_T stream)
Check for end-of-file.
Definition file_wrappers.c:2397
WS_DLL_PUBLIC char * file_gets(char *buf, int len, FILE_T stream)
Read a line from the file.
Definition file_wrappers.c:2390
FILE_T file_open(const char *path)
Open a file for reading or writing.
Definition file_wrappers.c:1674
WS_DLL_PUBLIC int file_getc(FILE_T stream)
Read the next byte from the file.
Definition file_wrappers.c:2292
WS_DLL_PUBLIC int64_t file_tell(FILE_T stream)
Get current position in the file.
Definition file_wrappers.c:2118
WS_DLL_PUBLIC int file_read(void *buf, unsigned int count, FILE_T file)
Read bytes from a file.
Definition file_wrappers.c:2181
void file_close(FILE_T file)
Close a file stream.
Definition file_wrappers.c:2447
WS_DLL_PUBLIC int file_peekc(FILE_T stream)
Peek the next byte from the file without advancing the position.
Definition file_wrappers.c:2245
bool file_fdreopen(FILE_T file, const char *path)
Reopens a file descriptor for reading.
Definition file_wrappers.c:2436
void file_clearerr(FILE_T stream)
Clear error and end-of-file indicators for a file stream.
Definition file_wrappers.c:2419
FILE_T file_fdopen(int fildes)
Open a file descriptor for reading or writing.
Definition file_wrappers.c:1488