prg_dir_contents()

摘要

获取指定目录中包含的所有目录名和文件名的列表。

语法

prg_dir_contents (directory_path_name)
参数 类型 说明
directory_path_name const char * 目标目录的路径

返回类型

PrgT_List *

一个新分配的字符串列表,列表中的各字符串为指定目录中文件和目录的名称。

头文件

prg_file_funcs.h

详情

返回值是一个新分配的 PrgT_List 字符串列表,其中各字符串均已分配内存。使用完毕后,调用者必须对该列表先调用 prg_list_free (),再调用 prg_mem_free ()。列表中不会包含 "." 和 ".." 这两个目录名。

传递给该函数的路径名应当是一个有效的目录。

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