Previous PageTable Of Contents../index.htmlIndexNext Page

gfqGetPath( )

Description | Example

Name:

int gfqGetPath (int ft, char *fn, char *fullfn);

Inputs:

int ft

  • Selects the symbolic constant. See Table 27.

char *fn

  • A pointer to a file, such as the queue file, "gfax.$qu", or a file to send, such as test001.tif.
 

char *fullfn

  • A pointer to a character buffer that is large enough to hold a fully qualified file path.

Outputs:

char *fullfn

  • A pointer to a fully-qualified filename when a file does exist or may be created.

Returns:

GFQSUCCESS

  • The function completed successfully; the "path" points to the desired file.

GFQPATH_NOT_SET

  • The file could not be found because the configuration information was not present. This is a fatal error.

GFQPATH_INVALID

  • The file could not be found because the configuration information was in error. This is a fatal error.

GFQPATH_NO_FILE

  • The file could not be found, but the configuration information seemed correct. The "path" points to the full filename where the file should exist.

GFQPATH_BAD_TYPE

  • The file type specified was invalid.

GFQPATH_BAD_FILE

  • The file specified is null.

Includes:

gfq.h path.h

 

Top Of PageDescription

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( ).

Top Of PageExample


Table 27. Symbolic Constants for gfqGetPath( )


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2000, Dialogic Corporation
All rights reserved
This page generated January, 2002