public void Save(string directory) { IndexContainer?.Save(directory, ConfigContainer); RootFile?.Write(directory, this); DownloadFile?.Write(directory, this); DownloadSizeFile?.Write(directory, this); InstallFile?.Write(directory, this); EncodingFile?.Write(directory, ConfigContainer); ConfigContainer?.Save(directory); RootFile?.FileLookup?.Close(); }
public void Save(string directory) { // if this field exists and mismatches the generated file; the client will error // if this field is missing the client will generate the file and variable itself ConfigContainer?.CDNConfig?.GetValues("archive-group")?.Clear(); IndexContainer?.Save(directory, ConfigContainer); RootFile?.Write(directory, this); DownloadFile?.Write(directory, this); DownloadSizeFile?.Write(directory, this); InstallFile?.Write(directory, this); EncodingFile?.Write(directory, ConfigContainer); ConfigContainer?.Save(directory); RootFile?.FileLookup?.Close(); }
/// <summary> /// Creates a new TACT container populated with: defaulted configs, an index container /// and an empty root, encoding, install and download file /// </summary> /// <param name="product"></param> /// <param name="locale"></param> /// <param name="build"></param> public void Create(string product, Locale locale, uint build) { Build = build; ConfigContainer = new Configs.ConfigContainer(product, locale); ConfigContainer.Create(); IndexContainer = new Indices.IndexContainer(); RootFile = new Root.RootFile(); EncodingFile = new Encoding.EncodingFile(); InstallFile = new Install.InstallFile(); DownloadFile = new Download.DownloadFile(); ApplyVersionSpecificSettings(build); // set the default tag entries InstallFile.SetDefaultTags(build); DownloadFile.SetDefaultTags(build); DownloadSizeFile?.SetDefaultTags(build); }