|
GCpp general purpose C++ library
version 1.0
|
#include "GGlobal.hh"Go to the source code of this file.
Functions | |
| string | GFileReadLine (FILE *fptr, int &error, const bool skip_empty=true, const u_int maxlen=4096) |
| int | GGetFileList (GStringList &flist, const string &dir, const string &pattern) |
| int | GGetFileList (GStringList &flist, const string &fpattern="*") |
Variables | |
| string | gFileCommentLine |
| ! String indicating a line comment in a data file | |
| string | gFileSpaces |
| ! String indicating all space characters | |
Include file for various functions related to files
| string GFileReadLine | ( | FILE * | fptr, |
| int & | error, | ||
| const bool | skip_empty, | ||
| const u_int | maxlen | ||
| ) |
Read a line from a file, taking care of spaces and comments:
| fptr | file pointer |
| error | error code |
| skip_empty | indicate the empty lines should be skipped |
| maxlen | maximum string length |
References gFileCommentLine, and gFileSpaces.
| int GGetFileList | ( | GStringList & | flist, |
| const string & | dir, | ||
| const string & | pattern | ||
| ) |
Get a list of files matching the pattern in the directory.
| flist | list of file names (output) |
| dir | directory name |
| pattern | file pattern to match |
References GListT< T >::Append(), GGetFileList(), and GLogWarning().
Referenced by GStringList::GetFileList(), and GGetFileList().
| int GGetFileList | ( | GStringList & | flist, |
| const string & | pattern | ||
| ) |
Get a list of files matching the pattern.
| flist | list of file names (output) |
| pattern | file pattern to match |
References GListT< T >::Append(), and GLogWarning().