public static BnSDatWriter Modify(string filename, bool is64) { FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite, FileShare.Read); BnSDatWriter result = BnSDatWriter.Create(fs, false); using (BnSDatArchive archive = BnSDatArchive.Read(fs, true)) using (IReader reader = archive.ExtractAllEntries()) while (reader.MoveToNextEntry()) { reader.CopyEntryTo(result); } return(result); }
public static BnSDatWriter Modify(string filename) => BnSDatWriter.Modify(filename, false);
public static BnSDatWriter Create(Stream stream, string temporaryFolder, bool leaveOpen) => BnSDatWriter.Create(stream, temporaryFolder, leaveOpen, false);
public static BnSDatWriter Create(Stream stream, bool leaveOpen, bool is64) => BnSDatWriter.Create(stream, null, leaveOpen, is64);
public static BnSDatWriter Create(Stream stream, string temporaryFolder) => BnSDatWriter.Create(stream, temporaryFolder, false);
public static BnSDatWriter Create(Stream stream, bool leaveOpen) => BnSDatWriter.Create(stream, leaveOpen, false);
public static BnSDatWriter Create(Stream stream) => BnSDatWriter.Create(stream, false);
public static BnSDatWriter Create(string filename, string temporaryFolder, bool is64) { FileStream fs = File.Create(filename); return(BnSDatWriter.Create(fs, temporaryFolder, false, is64)); }
public static BnSDatWriter Create(string filename, bool is64) => BnSDatWriter.Create(filename, null, is64);
public static BnSDatWriter Create(string filename, string temporaryFolder) => BnSDatWriter.Create(filename, temporaryFolder, false);
public static BnSDatWriter Create(string filename) => BnSDatWriter.Create(filename, false);