prg_tfile_path_rediscover()

Abstract

Searches all model directories for a specified model file and returns the full operating system path of the file.

Syntax

prg_tfile_path_rediscover (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, if the file is found.
buflen int Length of path_buf.

Return Type

PrgT_Compcode

PrgC_Compcode_Failure if the model file cannot be found or type is invalid; PrgC_Compcode_Success otherwise.

prg_file_funcs.h

Details

This function searches all of the model directories looking for the specified model file (specified by name and type). If the file is found, the function returns PrgC_Compcode_Success, puts the full file path in path_buf, and registers the file with the typed file (tfile) system. If the path is longer than buflen, it will be truncated to buflen - 1 characters.

This function can be used:

  • To find and register a file created or moved outside the tfile system (for example, by an external process or a raw fopen call within the application process)
  • To register the fact that the file was removed outside the tfile system

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