格式
typescript
Directory.Create(path)所属类: Directory
描述
创建指定路径的目录。
参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| path | string | 指定路径 |
返回值
| 类型 | 描述 |
|---|---|
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);
}
}