public System.IO.Stream OpenPackfileFile(string name, Packfiles.IPackfile packfile) { foreach (Packfiles.IPackfileEntry entry in packfile.Files) { if (entry.Name == name) { return(entry.GetStream()); } } throw new FileNotFoundException("Could not find the requested file in the supplied packfile.", name); }
public System.IO.Stream OpenPackfileFile(string name, Packfiles.IPackfile packfile) { foreach (Packfiles.IPackfileEntry entry in packfile.Files) { if (entry.Name == name) { return(entry.GetStream()); } } return(null); }
public System.IO.Stream OpenPackfileFile(string name, string packfile) { using (Packfiles.IPackfile pf = OpenPackfile(packfile)) { foreach (Packfiles.IPackfileEntry entry in pf.Files) { if (entry.Name == name) { return(entry.GetStream()); } } throw new FileNotFoundException("Could not find the requested file in packfile: " + packfile, name); } }
public System.IO.Stream OpenPackfileFile(string name, string packfile) { using (Packfiles.IPackfile pf = OpenPackfile(packfile)) { if (pf == null) { return(null); } foreach (Packfiles.IPackfileEntry entry in pf.Files) { if (entry.Name == name) { return(entry.GetStream()); } } return(null); } }