예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
파일: SaveFs.cs 프로젝트: tiliarou/LibHac
        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;
        }
예제 #4
0
        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;
            }
        }