private void StoreData(FileEntry entry, byte[] data) { entry.SetCustomData(data); }
private void Add(RPFLib.Common.Directory fsDirectory, byte[] data) { FileEntry newFileEntry = new FileEntry(_rpfFile.TOC); _rpfFile.TOC.Add(newFileEntry as TOCEntry); var file = new Common.File(); file._dataLoad = getCustom => LoadData(newFileEntry, getCustom); file._dataStore = setdata => StoreData(newFileEntry, setdata); file._dataCustom = () => newFileEntry.CustomData != null; file.d1 = () => newFileEntry.getSize(); file._Index = nIndex => newFileEntry.setIndex(nIndex); file._delete = () => newFileEntry.Delete(); file.CompressedSize = newFileEntry.SizeInArchive; file.IsCompressed = newFileEntry.IsCompressed; file.Name = GetName(newFileEntry); file.IsResource = newFileEntry.IsResourceFile; file.ParentDirectory = fsDirectory; fsDirectory.AddObject(file); newFileEntry.SetCustomData(data); }