Skip to content

格式

typescript
Directory.Create(path)

所属类: Directory

描述

创建指定路径的目录。

参数

参数名类型描述
pathstring指定路径

返回值

类型描述
boolean

代码示例

typescript
function TestDirectory(file_path: string) {
    try {
        Directory.Create(file_path);
            if (!Directory.Exists(file_path)) {
                Debug.Error("Directory '", file_path, "' has been created, but does not exist.");
            }
    } catch (error) {
        Debug.Error(error);
    }
}