可以通过调用fileIo.open函数来实现,open(path: string, mode?: number),指定第二个参数mode为fileIo.OpenMode.CREATE,表示如果文件不存在,则创建文件。
参考链接
文件管理