格式
typescript
File.Create(path)所属类: File
描述
创建指定路径的文件。
参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| path | string |
返回值
| 类型 | 描述 |
|---|---|
void |
代码示例
javascript
function Test(file_path: string) {
try {
File.Create(file_path);
if (!File.Exists(file_path)) {
Debug.Error("File '", file_path, "' has been created, but does not exist.");
}
} catch (error) {
Debug.Error(error);
}
}