glob
简介
仿python的glob库
提供获取文件和目录的方法
组件接口
glob.gs
函数原型 | 函数 作用 |
---|---|
string translate(string pattern) | 将通配符转为正则表达式 |
array glob(string path_name, bool recursive = true) | 查找匹配的文件列表 |
bool exist(string path_name) | 检查目标路径是否存在 |
bool is_file(string path_name) | 是不是一个文件 |
bool is_dir(string path_name) | 是不是一个目录 |
样例
public void pkg_sample()
{
write("sample");
}