public SaveDataFileSystemCore(IStorage storage, IStorage allocationTable, IStorage header) { HeaderStorage = header; BaseStorage = storage; AllocationTable = new AllocationTable(allocationTable, header.Slice(0x18, 0x30)); Header = new SaveHeader(HeaderStorage); AllocationTableStorage dirTableStorage = OpenFatStorage(AllocationTable.Header.DirectoryTableBlock); AllocationTableStorage fileTableStorage = OpenFatStorage(AllocationTable.Header.FileTableBlock); FileTable = new HierarchicalSaveFileTable(dirTableStorage, fileTableStorage); }
public SaveDataFileSystemCore(IStorage storage, IStorage allocationTable, IStorage header) { HeaderStorage = header; BaseStorage = storage; AllocationTable = new AllocationTable(allocationTable, header.Slice(0x18, 0x30)); Header = new SaveHeader(HeaderStorage); // todo: Query the FAT for the file size when none is given AllocationTableStorage dirTableStorage = OpenFatBlock(AllocationTable.Header.DirectoryTableBlock, 1000000); AllocationTableStorage fileTableStorage = OpenFatBlock(AllocationTable.Header.FileTableBlock, 1000000); FileTable = new HierarchicalSaveFileTable(dirTableStorage, fileTableStorage); }
public SaveFs(IStorage storage, IStorage allocationTable, IStorage header) { HeaderStorage = header; BaseStorage = storage; AllocationTable = new AllocationTable(allocationTable, header.Slice(0x18, 0x30)); Header = new SaveHeader(HeaderStorage); ReadFileInfo(); var dictionary = new Dictionary <string, FileEntry>(); foreach (FileEntry entry in Files) { dictionary[entry.FullPath] = entry; } FileDictionary = dictionary; }
public SaveDataFileSystemCore(IStorage storage, IStorage allocationTable, IStorage header) { HeaderStorage = header; BaseStorage = storage; AllocationTable = new AllocationTable(allocationTable, header.Slice(0x18, 0x30)); Header = new SaveHeader(HeaderStorage); ReadFileInfo(); FileDictionary = new Dictionary <string, SaveFileEntry>(); foreach (SaveFileEntry entry in Files) { FileDictionary[entry.FullPath] = entry; } DirDictionary = new Dictionary <string, SaveDirectoryEntry>(); foreach (SaveDirectoryEntry entry in Directories) { DirDictionary[entry.FullPath] = entry; } }