/// <summary> /// Install Entries. /// </summary> /// <param name="entry">The entry<see cref="IArchiveEntryViewModel"/>.</param> /// <param name="path">The path<see cref="string"/>.</param> /// <returns>The <see cref="bool"/>.</returns> public static bool IsInstalled(this IArchiveEntryViewModel entry, string path) { if (entry.IsDirectory) { return(Directory.Exists(Path.Combine(path, entry.Name))); } return(File.Exists(Path.Combine(path, entry.Name))); }
/// <summary> /// The Full Normal Name. /// </summary> /// <param name="entry">The entry<see cref="IArchiveEntryViewModel"/>.</param> /// <returns>The <see cref="string"/>.</returns> public static string FullNormalName(this IArchiveEntryViewModel entry) { return(entry.FullName.Trim('/').Replace('/', '\\')); }
/// <summary> /// The Checks to see if any checked entries are installed. /// </summary> /// <param name="vm">The vm<see cref="IArchiveEntryViewModel"/>.</param> /// <param name="path">The path<see cref="string"/>.</param> /// <returns>The <see cref="bool"/>.</returns> public static bool AreAnyCheckedEntriesInstalled(this IArchiveEntryViewModel vm, string path) { return(vm.SortedEntries.Values.Where(e => e.WillInstall).Any(e => e.IsInstalled(path))); }