static void ExtractEntry(DataIEX iex, IEXEntry entry, string file) { using (FileStream target = new FileStream(file, FileMode.Create)) { iex.CopyEntryToStream(entry, target); } }
private static IEXEntry[] CreateEntryList(JToken fileInfo, string extractName, string dir) { string collectionName = extractName + "s"; JArray array = (JArray)fileInfo[collectionName]; IEXEntry[] entryList = new IEXEntry[array.Count]; for (int x = 0; x < array.Count; x++) { if ((string)array[x] == null) { entryList[x] = null; continue; } string filePath = (string)array[x]; entryList[x] = CreateEntry(dir, filePath); } return(entryList); }