Пример #1
0
        public string method_25(GClass82 gclass82_0, string string_15)
        {
            if (!Directory.Exists(this.String_8))
            {
                Directory.CreateDirectory(this.String_8);
            }
            string str1 = ((long)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds).ToString();
            string str2 = Path.Combine(this.String_8, str1 + ".zip");

            try
            {
                BackupWiiUSaves.BackupWiiUSave((GClass30)this, gclass82_0.IPAddress_0, str2);
            }
            catch
            {
                GClass6.smethod_6(str2);
                throw;
            }
            if (!File.Exists(str2))
            {
                return((string)null);
            }
            using (FileStream fileStream = File.Open(str2, FileMode.Open, FileAccess.ReadWrite))
            {
                using (ZipArchive zipArchive = new ZipArchive((Stream)fileStream, ZipArchiveMode.Update))
                {
                    using (StreamWriter streamWriter = new StreamWriter(zipArchive.CreateEntry("meta.json").Open()))
                    {
                        string str3 = JsonConvert.SerializeObject((object)new SaveDescription()
                        {
                            Description = string_15,
                            Timestamp   = str1,
                            Region      = this.Region,
                            Name        = this.Name,
                            TitleId     = this.TitleId.IdRaw
                        });
                        streamWriter.Write(str3);
                    }
                }
            }
            return(str2);
        }
Пример #2
0
        public void method_26(GClass82 gclass82_0, string string_15)
        {
            string string_0 = Path.Combine(this.String_8, string_15 + ".zip");

            BackupWiiUSaves.BackupWiiUSaveZip((GClass30)this, gclass82_0.IPAddress_0, string_0);
        }