🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
``` function writeReport(path, reportText) { var reportFile = new File(path ); //path + "/font_report.txt" if(reportFile.exists){ //alert('file already exists'); reportFile.open("w"); //reportFile.open("a"); //a是append模式 reportFile.write(reportText); reportFile.close(); } else{ var RCF_file = new File(reportFile); RCF_file.open("w"); RCF_file.write(reportText); RCF_file.close(); } //alert('Report Complete'); } ```