LAL  7.5.0.1-b72065a
FileIO.h File Reference

Prototypes

LALFILE * lalstdin (void)
 
LALFILE * lalstdout (void)
 
LALFILE * lalstderr (void)
 
int XLALFileIsCompressed (const char *path)
 
LALFILE * XLALFileOpenRead (const char *path)
 
LALFILE * XLALFileOpenWrite (const char *path, int compression)
 
LALFILE * XLALFileOpenAppend (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...
 
char * XLALFileLoad (const char *path)
 Read a complete data-file into memory as a string. More...
 
int XLALGzipTextFile (const char *path)
 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.

Macros

#define LALSTDIN   (lalstdin())
 
#define LALSTDOUT   (lalstdout())
 
#define LALSTDERR   (lalstderr())
 
#define XLAL_FILE_RESOLVE_PATH(fname)   XLALFileResolvePathLong ( fname, LAL_FALLBACK_DATA_PATH )
 'Resolve' a given filename 'fname', returning a file path where the file can successfully be opened by fopen() using mode='rb'. More...