示例#1
0
        public static void saveFile()
        {
            if (!File.Exists(name))
            {
                File.Create(name).Close();
            }

            File.WriteAllText(name, DataHolder.getData());
        }
示例#2
0
        public static void loadFile()
        {
            if (!File.Exists(name))
            {
                File.Create(name).Close();
                return;
            }

            if (DataHolder.setData(File.ReadAllLines(name)) == 0)
            {
                Imports.kernelErrMsg("Save file has no valid content");
            }
        }