public PropertyFile(Gibbed.Spore.Package.DatabaseIndex index) { byte[] data = index.GetIndexData(true); using (Stream s = new MemoryStream(data, 0, data.Length)) { this.Read(s); } }
public static void WriteToPath(DatabaseIndex element, string path) { if (string.IsNullOrWhiteSpace(path)) { return; } using (FileStream fileStream = File.Create(path)) { byte[] data = element.GetIndexData(true); fileStream.Write(data, 0, data.Length); } }