prg_file_typed_file_prepare_write()
Abstract
Allocates memory for a string containing the full pathname of a base typed file, based on where it is located in the current set of model directories.
Syntax
prg_file_typed_file_prepare_write (filename, file_type, dest_name)
| Argument | Type | Description |
|---|---|---|
filename |
const char* |
filename of the typed file. |
file_type |
“PrgT_Tfile_Type“ | tfile type (one of the values in Table 5 “Tfile Package Symbolic Constants“ on page 152) |
dest_name |
char ** |
Pointer to the destination where to put file. |
Return Type
PrgT_Compcode
PrgC_Compcode_Success; otherwise, PrgC_Compcode_Failure.
Header
prg_file_funcs.h
Details
This function allocates memory for a string that contains the full pathname of a base file (filename) of type file_type based on where it is located in the current set of model directories. If no file exists already, the path will be set to be located in the primary models directory. Additional side-effects include creating a blank file if such a file does not already exist. The string dest_name must be deallocated with prg_mem_free() when no longer needed.