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.

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.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com