prg_tfile_path_get()

Abstract

Returns the full operating system file path of the specified model file.

Syntax

prg_tfile_path_get (model_name, type, path_buf, buflen)
Argument Type Description
model_name const char * Name of the model of interest.
type PrgT_Tfile_Type Type of the model file of interest. See Table 5 Tfile Package Symbolic Constants for a list of the constants used to specify a model type.
path_buf char * Buffer to hold the path string
buflen int Length of path_buf

Return Type

PrgT_Compcode

PrgC_Compcode_Failure if the model file does not exist or does not have a recognized header block; PrgC_Compcode_Success otherwise.

prg_file_funcs.h

Details

This function returns a string giving the full path to the specified model file (specified by name and type). The path is returned in path_buf. If the path is longer than buflen, it will be truncated to buflen - 1 characters.

This function fails if the model file does not exist or if the file was created outside of the application after it was started or after the last time the user ran the File > Model Files > Refresh Model Directories operation.

If there is a chance that the file was created, moved, or removed outside of the typed file (tfile) system, you should use prg_tfile_path_rediscover() instead. It will search through all of the model directories looking for the specified file.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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