猴子原创,欢迎转载.转载请注明: 转载自Cocos2Der-CSDN,谢谢! 原文地址: http://blog.csdn.net/cocos2der/article/details/50595585 最近经常需要些一个编译工作脚本,经常操作一个文件.下面是一个汇总了的文件操作方法. using UnityEngine; #if UNITY_EDITOR using UnityEditor; using System; using System.IO; using System.Threadin…
文件操作之前需要文件保证文件存在,并且将文件open os.mknod("test.txt") 创建空文件 fp = open("test.txt",w) 直接打开一个文件,如果文件不存在则创建文件 open(name[, mode[, buffering]]) -> file object Open a file using the file() tyoe, returns a file object. This is the pref…