static void PrepareCartfile()
        {
            var file           = Cartfile.LoadOrCreate(CartfilePath);
            var predefinedItem = bundledCartfile().items[0];

            file.UpdateOrAddEntry(predefinedItem.source, predefinedItem.content, predefinedItem.version);
            file.Save();
        }
示例#2
0
        internal static Cartfile LoadOrCreate(string path)
        {
            Cartfile file;

            if (File.Exists(path))
            {
                file = Load(path);
            }
            else
            {
                file = new Cartfile();
            }

            file.path = path;
            return(file);
        }
 static Cartfile bundledCartfile()
 {
     return(Cartfile.Load(BundledCartfilePath));
 }