Skip to content

格式

typescript
File.Create(path)

所属类: File

描述

创建指定路径的文件。

参数

参数名类型描述
pathstring

返回值

类型描述
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);
	}
}