/// <summary> /// We don't want to make the installer index all the archives, that's just a waste of time, so instead /// we'll pass just enough information to VFS to let it know about the files we have. /// </summary> private void PrimeVFS() { HashedArchives.Do(a => VFS.AddKnown(new VirtualFile() { Paths = new string[] { a.Value }, Hash = a.Key })); VFS.RefreshIndexes(); ModList.Directives .OfType <FromArchive>() .Do(f => { var updated_path = new string[f.ArchiveHashPath.Length]; f.ArchiveHashPath.CopyTo(updated_path, 0); updated_path[0] = VFS.HashIndex[updated_path[0]].Where(e => e.IsConcrete).First().FullPath; VFS.AddKnown(new VirtualFile() { Paths = updated_path }); }); VFS.BackfillMissing(); }
/// <summary> /// We don't want to make the installer index all the archives, that's just a waste of time, so instead /// we'll pass just enough information to VFS to let it know about the files we have. /// </summary> public async Task PrimeVFS() { VFS.AddKnown(HashedArchives.Select(a => new KnownFile { Paths = new[] { a.Value }, Hash = a.Key })); VFS.AddKnown( ModList.Directives .OfType <FromArchive>() .Select(f => new KnownFile { Paths = f.ArchiveHashPath })); await VFS.BackfillMissing(); }
/// <summary> /// We don't want to make the installer index all the archives, that's just a waste of time, so instead /// we'll pass just enough information to VFS to let it know about the files we have. /// </summary> protected async Task PrimeVFS() { VFS.AddKnown(ModList.Directives.OfType <FromArchive>().Select(d => d.ArchiveHashPath), HashedArchives); await VFS.BackfillMissing(); }