public VFile GetFile(string file) { if (!_files.ContainsKey(file)) { return(null); } return(VFile.FromZipEntry(_files[file])); }
public static VFile FromZipEntry(ZipArchiveEntry zipEntry) { var file = new VFile(); file.FileName = zipEntry.Name; file.FileData = zipEntry.Open(); file.FileDataLength = zipEntry.Length; return(file); }
public VFile[] GetFilesByExtension(string extension) { var fileList = new List <VFile>(); foreach (var vfile in _files) { if (vfile.Key.EndsWith(extension)) { fileList.Add(VFile.FromZipEntry(vfile.Value)); } } return(fileList.ToArray()); }