LAL  7.5.0.1-b72065a
FileIO.c File Reference

Prototypes

LALFILE * lalstdin (void)
 
LALFILE * lalstdout (void)
 
LALFILE * lalstderr (void)
 
char * XLALFileLoad (const char *path)
 Read a complete data-file into memory as a string. More...
 
int XLALFileIsCompressed (const char *path)
 
LALFILE * XLALFileOpenRead (const char *path)
 
LALFILE * XLALFileOpenAppend (const char *path, int compression)
 
LALFILE * XLALFileOpenWrite (const char *path, int compression)
 
LALFILE * XLALFileOpen (const char *path, const char *mode)
 
int XLALFileClose (LALFILE *file)
 
size_t XLALFileRead (void *ptr, size_t size, size_t nobj, LALFILE *file)
 
size_t XLALFileWrite (const void *ptr, size_t size, size_t nobj, LALFILE *file)
 
int XLALFileGetc (LALFILE *file)
 
int XLALFilePutc (int c, LALFILE *file)
 
char * XLALFileGets (char *s, int size, LALFILE *file)
 
int XLALFilePuts (const char *s, LALFILE *file)
 
int XLALFileVPrintf (LALFILE *file, const char *fmt, va_list ap)
 
int XLALFilePrintf (LALFILE *file, const char *fmt,...)
 
int XLALFileFlush (LALFILE *file)
 
int XLALFileSeek (LALFILE *file, long offset, int whence)
 
long XLALFileTell (LALFILE *file)
 
void XLALFileRewind (LALFILE *file)
 
int XLALFileSetBuffer (LALFILE *file, char *buf, int mode, size_t size)
 Set buffering for file I/O. More...
 
int XLALFileEOF (LALFILE *file)
 
int XLALFileIsRegularAndGetSize (const char *path, size_t *fileLen)
 Check if path points to a 'regular file', rather than a directory or sth else. More...
 
int XLALFileIsRegular (const char *path)
 Check if given file is 'regular' (rather than a directory or sth else) More...
 
size_t XLALFileSize (const char *path)
 Return the size of given file in bytes. More...
 
int XLALGzipTextFile (const char *filename)
 Use gzip to compress a text file This function will use the gzip compression routines in zlib to compress a text file. More...
 
int XLALGunzipTextFile (const char *filename)
 Use gzip to uncompress a compressed text file. More...
 

Go to the source code of this file.

Data Structures

struct  LALFILE
 

Macros

#define _GNU_SOURCE
 
#define ZLIB_ENABLED
 
#define WAI_FUNCSPEC   static UNUSED
 

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Definition at line 22 of file FileIO.c.

◆ ZLIB_ENABLED

#define ZLIB_ENABLED

Definition at line 39 of file FileIO.c.

◆ WAI_FUNCSPEC

#define WAI_FUNCSPEC   static UNUSED

Definition at line 54 of file FileIO.c.