/// <summary> /// Unmount a bundle. /// </summary> /// <param name="bundle"></param> public void UnmountBundle(VfsBundle bundle) { if (!Bundles.Exists(b => b.ID == bundle.ID)) { throw new Exception($"Bundle [{bundle.ID}] is not mounted to [{Path}]."); } UnmountBundle(bundle.ID); }
/// <summary> /// Mount a bundle. /// </summary> /// <param name="bundle"></param> public void MountBundle(VfsBundle bundle) { if (Bundles.Exists(b => b.ID == bundle.ID)) { throw new Exception($"Bundle [{bundle.ID}] is already mounted to [{Path}]."); } Bundles.Add(bundle); }
/// <summary> /// Unmount a bundle. /// </summary> /// <param name="bundleId"></param> public void UnmountBundle(Guid bundleId) { if (!Bundles.Exists(b => b.ID == bundleId)) { throw new Exception($"Bundle [{bundleId}] is not mounted to [{Path}]."); } Bundles.Remove(Bundles.Find(b => b.ID == bundleId)); }
/// <summary> /// Mount a bundle to the bundle. Yes, seriously. /// </summary> /// <param name="bundle"></param> public VfsBundle MountBundle(VfsBundle bundle) { if (Bundles.Exists(b => b.ID == bundle.ID)) { throw new Exception($"Bundle [{bundle.ID}] is already mounted to bundle {Name}."); } Bundles.Add(bundle); return(Bundles.Find(b => b.ID == bundle.ID)); }