public InlinePackageFile(IPackage package, string path) { _package = package; _entry = package.GetEntry(path); FilePath = path; _files = new HashSet <string>(_package.GetFiles(FilePath)); _folders = new HashSet <string>(_package.GetDirectories(FilePath)); }
public InlinePackageFile(string fileName) { switch (Path.GetExtension(fileName)) { case ".pak": _package = new PakPackage(new FileInfo(fileName)); break; case ".vpk": _package = new VpkDirectory(new FileInfo(fileName)); break; default: throw new ArgumentException("This file format is not a valid inline package file."); } FilePath = ""; _entry = null; _files = new HashSet <string>(_package.GetFiles(FilePath)); _folders = new HashSet <string>(_package.GetDirectories(FilePath)); }