Defines | |
| #define | COPY_STR "cp %s %s" |
Functions | |
| bool | endsWith (char *string, char *ending) |
| char * | strip (char *aString) |
| int | longestName (char *filenames[], int nFiles) |
| bool | lowerStrNCmp (const char *str1, const char *str2, int n) |
| void | stringTokenizer (char *line) |
| char * | nextToken () |
| char * | constructFileName (char *baseDir, const char *fileName) |
| char * | constructFileNameOld (char *basedir, char *filename) |
| char * | td_malloc (size_t size) |
| void | td_free (void *mem, size_t size) |
| long | getMemoryReport () |
| DIR * | exists (const char *name) |
| bool | isEmpty (DIR *pd) |
| bool | isWritable (char *pathname) |
| bool | isReadable (char *pathname) |
| void | copyFiles (const char *source, const char *dest) |
| DIR * | getDirectory (char *dirName) |
| DIR * | getDirectoryR (char *dirNameOrig) |
| char * | getParent (char *path) |
| void | getParentNChild (char *path, char **parentPtr, char **childPtr) |
| char * | getNextEmptyDirectory (char *baseDir) |
Variables | |
| int | MAX_DIRECTORY_VERSION = 9999 |
| static int | parserIdx = -1 |
| static char * | parserLine = NULL |
| static int | parserLineLength = -1 |
| static long | MemoryInUse = 0 |
| #define COPY_STR "cp %s %s" |
| char* constructFileName | ( | char * | baseDir, | |
| const char * | fileName | |||
| ) |
| char* constructFileNameOld | ( | char * | basedir, | |
| char * | filename | |||
| ) |
| void copyFiles | ( | const char * | source, | |
| const char * | dest | |||
| ) |
Copy file from source to destination. This function make a system call to perform the copy.
| [in] | source | Character string containing path to source file. |
| [in] | dest | Character string containing path to destination. |
| bool endsWith | ( | char * | string, | |
| char * | ending | |||
| ) |
| DIR* exists | ( | const char * | name | ) |
| DIR* getDirectory | ( | char * | dirName | ) |
Get the directory structure (pointer) associated with a string name If the directory exists, return a pointer to it. If the directory doesn't exist, create it and return a pointer to it. If the directory cannot be created, report an error and return NULL.
| [in] | dirName | Character string containing full path for directory. |
| DIR* getDirectoryR | ( | char * | dirNameOrig | ) |
Get directory recursive; start a the left side and create or get each part of the directory.
| [in] | dirNameOrig | Character string containing the full directory path |
| long getMemoryReport | ( | ) |
| char* getNextEmptyDirectory | ( | char * | baseDir | ) |
function to parse base output directory line find a directory that is empty, create one if needed by appending _v2, _v3, etc. up to _v9999, which is the max.
| [in] | baseDir | Character string containing full path to a directory. |
| char* getParent | ( | char * | path | ) |
Get the parent part of the path.
| [in] | path | String containing the full path. |
| void getParentNChild | ( | char * | path, | |
| char ** | parentPtr, | |||
| char ** | childPtr | |||
| ) |
Split path into parent and child
| [in] | path | String containing path to split. |
| [in,out] | parentPtr | Pointer to string containing parent name. |
| [in,out] | childPtr | Pointer to string containing child name. |
| bool isEmpty | ( | DIR * | pd | ) |
Determine if the directory is empty.
| [in] | pd | Pointer to a DIR structure |
| bool isReadable | ( | char * | pathname | ) |
Determine if the directory or file is accessible for reading.
| [in] | pathname | Character string containing the name of the directory or file. |
| bool isWritable | ( | char * | pathname | ) |
Determine if we have write permission to the directory.
| [in] | pathname | Character string containing full path to directory. |
| int longestName | ( | char * | filenames[], | |
| int | nFiles | |||
| ) |
| bool lowerStrNCmp | ( | const char * | str1, | |
| const char * | str2, | |||
| int | n | |||
| ) |
Compare two string up to n characters. Comparison is done with lowercase version of each string.
| [in] | str1 | A string to compare. |
| [in] | str2 | Another string to compare. |
| [in] | n | maximum number of characters to compare. |
| char* nextToken | ( | ) |
stringTokenizer and nextToken work together to parse a character string into tokens, separated by spaces. nextToken finds the next set of non-white space characters, which is considered a token.
| void stringTokenizer | ( | char * | line | ) |
stringTokenizer and nextToken work together to parse a character string into tokens, separated by spaces. stringTokenizer intializes variables for breaking a string into tokens.
| [in] | line | The string to break into words. |
| char* strip | ( | char * | aString | ) |
| void td_free | ( | void * | mem, | |
| size_t | size | |||
| ) |
| char* td_malloc | ( | size_t | size | ) |
| int MAX_DIRECTORY_VERSION = 9999 |
long MemoryInUse = 0 [static] |
int parserIdx = -1 [static] |
char* parserLine = NULL [static] |
int parserLineLength = -1 [static] |
1.7.0