判断文件夹是否存在 - IsDirectory
函数简介
判断指定路径的文件夹是否存在。
接口名称
IsDirectory
DLL调用
int IsDirectory(long instance, string path);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| path | 字符串 | 要判断的文件夹路径。 |
示例
C++
long instance = CreateCOLAPlugInterFace();
// 判断文件夹是否存在
int exists = IsDirectory(instance, "C:\\test\\mydir");
if (exists) {
// 文件夹存在,可进行后续操作
}
Python
# 待补充
返回值
1 存在,0 不存在或失败。
注意事项
- 路径无效时返回0。
