
Name: |
int gfqGetPath (int ft, char *fn, char *fullfn); | |
Inputs: |
int ft |
|
|
char *fn |
|
char *fullfn |
| |
Outputs: |
char *fullfn |
|
Returns: |
GFQSUCCESS |
|
|
GFQPATH_NOT_SET |
|
|
GFQPATH_INVALID |
|
|
GFQPATH_NO_FILE |
|
|
GFQPATH_BAD_TYPE |
|
|
GFQPATH_BAD_FILE |
|
Includes: |
gfq.h path.h |
|
The gfqGetPath( ) function can be used to construct the path to a subdirectory where a file should be written, and can be used to locate the place to put a file that may not exist. It always returns a fully qualified filename, even if the file is not found. The function gfqSearchPath( ) should be used to locate a file that must exist.
gfqGetPath( ) uses the symbolic constants defined in Table 27. When a specific file type is sought, the function looks for an environment variable, such as those in the "Initial Search Target" column of Table 27. If an environment variable exists and is correct, the function uses it to create a full filename. If the environment variable was not specified, the function looks for an alternate environment variable or the current directory. If everything is proper, it returns a full filename. In the example that follows, GFQDIR_SEND is one of the basic file types (symbolic constants) defined. "path" in the example is a pointer to the full name of the file returned by gfqGetPath( ).
#include "gfq.h" #include "gfqpath.h" char path[64]; if (gfqGetPath(GFQDIR_SEND, "test001.tif", path) == GFQSUCCESS)
printf ("The path is %s\n", path);
Table 27. Symbolic Constants for gfqGetPath( )
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation