### Folder Class - GetKnownFolder Source: https://context7.com/smourier/jumplistexplorer/llms.txt Retrieve Windows known folders (Desktop, Documents, Downloads, etc.) by their GUID. ```APIDOC ## Folder Class - GetKnownFolder Retrieve Windows known folders (Desktop, Documents, Downloads, etc.) by their GUID. ### Method ```csharp using JumpListExplorer.Shell; using JumpListExplorer.Interop; // Get the Desktop folder Folder? desktop = Folder.GetKnownFolder(KNOWNFOLDERID.FOLDERID_Desktop); Console.WriteLine($"Desktop: {desktop?.SIGDN_FILESYSPATH}"); // Output: Desktop: C:\Users\John\Desktop // Access the static Desktop property (cached) Folder desktopCached = Folder.Desktop; Console.WriteLine($"Desktop (cached): {desktopCached.SIGDN_FILESYSPATH}"); ``` ### Parameters - **folderId** (KNOWNFOLDERID): An enumeration value representing the known folder to retrieve (e.g., `KNOWNFOLDERID.FOLDERID_Desktop`). ### Response - **Folder?**: Returns a `Folder` object representing the known folder, or `null` if the folder cannot be found. ``` -------------------------------- ### Get System Icon from Image List Source: https://context7.com/smourier/jumplistexplorer/llms.txt Retrieves the system icon for a given file path, functional even if the file does not exist. Ensure necessary using directives are included. ```csharp using JumpListExplorer.Utilities; using JumpListExplorer.Interop; using System.Drawing; // Get icon for a file path (works even if file doesn't exist) Icon? pdfIcon = IconUtilities.GetIconFromImageList(@"C:\example.pdf", SHIL.SHIL_LARGE); Icon? exeIcon = IconUtilities.GetIconFromImageList(@"C:\app.exe", SHIL.SHIL_SYSSMALL); // Use icons in your application if (pdfIcon != null) { imageList.Images.Add(".pdf", pdfIcon); } ``` -------------------------------- ### Get System Icons from Image List Source: https://context7.com/smourier/jumplistexplorer/llms.txt Retrieve system icons for shell items at different standard sizes (small, large, extra-large). The retrieved icon can be converted to a Bitmap for use in UI elements. ```csharp using JumpListExplorer.Shell; using JumpListExplorer.Interop; using System.Drawing; var item = AutomaticDestinationList.GetItems("Microsoft.Windows.Explorer").First(); // Get small system icon (16x16) Icon? smallIcon = item.GetIconFromImageList(SHIL.SHIL_SYSSMALL); // Get large icon (32x32) Icon? largeIcon = item.GetIconFromImageList(SHIL.SHIL_LARGE); // Get extra large icon (48x48) Icon? extraLargeIcon = item.GetIconFromImageList(SHIL.SHIL_EXTRALARGE); // Use in Windows Forms if (smallIcon != null) { pictureBox.Image = smallIcon.ToBitmap(); } ``` -------------------------------- ### Get Windows Known Folders Source: https://context7.com/smourier/jumplistexplorer/llms.txt Access predefined Windows folders like Desktop, Documents, or Downloads using their GUIDs or static properties. The SIGDN_FILESYSPATH property provides the full path. ```csharp using JumpListExplorer.Shell; using JumpListExplorer.Interop; // Get the Desktop folder Folder? desktop = Folder.GetKnownFolder(KNOWNFOLDERID.FOLDERID_Desktop); Console.WriteLine($"Desktop: {desktop?.SIGDN_FILESYSPATH}"); // Output: Desktop: C:\Users\John\Desktop // Access the static Desktop property (cached) Folder desktopCached = Folder.Desktop; Console.WriteLine($"Desktop (cached): {desktopCached.SIGDN_FILESYSPATH}"); ``` -------------------------------- ### Access Shell Item Display Name Properties Source: https://context7.com/smourier/jumplistexplorer/llms.txt Provides access to various display name formats for shell items using SIGDN constants. Useful for getting different representations of a file or folder path. ```csharp using JumpListExplorer.Shell; // Assuming 'item' is retrieved from AutomaticDestinationList.GetItems() Item item = AutomaticDestinationList.GetItems("Microsoft.Windows.Explorer").First(); // Get different display name formats Console.WriteLine($"Normal Display: {item.SIGDN_NORMALDISPLAY}"); // "Documents" Console.WriteLine($"File System Path: {item.SIGDN_FILESYSPATH}"); // "C:\Users\John\Documents" Console.WriteLine($"Desktop Absolute: {item.SIGDN_DESKTOPABSOLUTEPARSING}"); // "::{GUID}\Documents" Console.WriteLine($"URL: {item.SIGDN_URL}"); // "file:///C:/Users/John/Documents" Console.WriteLine($"Parent Relative: {item.SIGDN_PARENTRELATIVE}"); // "Documents" ``` -------------------------------- ### Open Files and Explorer Windows Source: https://context7.com/smourier/jumplistexplorer/llms.txt Utilize static methods to open a specified file with its default application or open Windows Explorer at a given directory path. ```csharp using JumpListExplorer.Utilities; // Open a file with its default application WindowsUtilities.OpenFile(@"C:\Documents\report.pdf"); // Open Explorer and navigate to a folder (with selection) WindowsUtilities.OpenExplorer(@"C:\Users\John\Documents"); ``` -------------------------------- ### WindowsUtilities - OpenFile and OpenExplorer Source: https://context7.com/smourier/jumplistexplorer/llms.txt Launch files with their default applications or open Explorer at a specific location. ```APIDOC ## WindowsUtilities Class - OpenFile and OpenExplorer Launch files with their default applications or open Explorer at a specific location. ### Method ```csharp using JumpListExplorer.Utilities; // Open a file with its default application WindowsUtilities.OpenFile(@"C:\Documents\report.pdf"); // Open Explorer and navigate to a folder (with selection) WindowsUtilities.OpenExplorer(@"C:\Users\John\Documents"); ``` ### Parameters - **filePath** (string): The full path to the file to open. - **folderPath** (string): The path to the folder to open in Explorer. ### Response These methods do not return a value but initiate external processes. ``` -------------------------------- ### GetProperty and GetProperties Source: https://context7.com/smourier/jumplistexplorer/llms.txt Retrieve extended shell properties using Windows property keys. ```APIDOC ## GetProperty and GetProperties Retrieve extended shell properties using Windows property keys. ### Method ```csharp using JumpListExplorer.Shell; using JumpListExplorer.Interop; var item = AutomaticDestinationList.GetItems("Microsoft.Windows.Explorer").First(); // Get a specific property with type safety long? fileSize = item.GetProperty(PROPERTYKEY.System.Size); DateTime? dateModified = item.GetProperty(PROPERTYKEY.System.DateModified); // Get all properties as a dictionary var allProperties = item.GetProperties(GETPROPERTYSTOREFLAGS.GPS_DEFAULT); foreach (var kvp in allProperties) { Console.WriteLine($"{kvp.Key}: {kvp.Value}"); } // Get property with default value fallback string itemType = item.GetProperty(PROPERTYKEY.System.ItemType, "Unknown"); ``` ### Parameters - **propertyKey** (PROPERTYKEY): The key identifying the property to retrieve. - **defaultValue** (T): An optional default value to return if the property is not found. - **flags** (GETPROPERTYSTOREFLAGS): Flags to control how properties are retrieved (for `GetProperties`). ### Response - **GetProperty**: Returns the value of the specified property, cast to the specified type `T`, or `null` (or the `defaultValue`) if not found. - **GetProperties**: Returns a dictionary (`IReadOnlyDictionary`) containing all retrieved properties. ``` -------------------------------- ### Access File Metadata Properties Source: https://context7.com/smourier/jumplistexplorer/llms.txt Iterate through shell items and access basic file metadata like name, type, size, and dates. Ensure the correct application name is provided to GetItems. ```csharp using JumpListExplorer.Shell; foreach (var item in AutomaticDestinationList.GetItems("Microsoft.Windows.Notepad")) { // Basic metadata Console.WriteLine($"Name: {item.SIGDN_NORMALDISPLAY}"); Console.WriteLine($"Type: {item.ItemTypeText}"); // e.g., "Text Document" Console.WriteLine($"Extension: {item.ItemType}"); // e.g., ".txt" Console.WriteLine($"Size: {item.Size} bytes"); // Date properties Console.WriteLine($"Created: {item.DateCreated}"); Console.WriteLine($"Modified: {item.DateModified}"); Console.WriteLine($"Accessed: {item.DateAccessed}"); // Attributes Console.WriteLine($"Is Folder: {item.IsFolder}"); Console.WriteLine($"Is Hidden: {item.IsHidden}"); Console.WriteLine($"Is ReadOnly: {item.IsReadOnly}"); // Parent folder if (item.Parent != null) { Console.WriteLine($"Parent: {item.Parent.SIGDN_FILESYSPATH}"); } } ``` -------------------------------- ### Item Class - Display Name Properties Source: https://context7.com/smourier/jumplistexplorer/llms.txt Access various display name formats and properties for shell items. ```APIDOC ## Item Class Properties ### Description The `Item` class wraps a Windows Shell item and provides access to file metadata and properties, including various display name formats. ### Method GET (conceptual, accessing properties of an Item object) ### Endpoint N/A (object property access) ### Parameters None (accessing properties of an existing Item object) ### Request Example ```csharp using JumpListExplorer.Shell; // Assuming 'item' is retrieved from AutomaticDestinationList.GetItems() Item item = AutomaticDestinationList.GetItems("Microsoft.Windows.Explorer").First(); // Get different display name formats Console.WriteLine($"Normal Display: {item.SIGDN_NORMALDISPLAY}"); // "Documents" Console.WriteLine($"File System Path: {item.SIGDN_FILESYSPATH}"); // "C:\\Users\\John\\Documents" Console.WriteLine($"Desktop Absolute: {item.SIGDN_DESKTOPABSOLUTEPARSING}"); // "::{GUID}\\Documents" Console.WriteLine($"URL: {item.SIGDN_URL}"); // "file:///C:/Users/John/Documents" Console.WriteLine($"Parent Relative: {item.SIGDN_PARENTRELATIVE}"); // "Documents" ``` ### Response #### Success Response (200) - **SIGDN_NORMALDISPLAY** (string) - The standard display name of the item. - **SIGDN_FILESYSPATH** (string) - The file system path of the item. - **SIGDN_DESKTOPABSOLUTEPARSING** (string) - The absolute path for parsing on the desktop. - **SIGDN_URL** (string) - The URL representation of the item. - **SIGDN_PARENTRELATIVE** (string) - The name of the item relative to its parent. #### Response Example ```json { "SIGDN_NORMALDISPLAY": "Documents", "SIGDN_FILESYSPATH": "C:\\Users\\John\\Documents", "SIGDN_DESKTOPABSOLUTEPARSING": "::{GUID}\\Documents", "SIGDN_URL": "file:///C:/Users/John/Documents", "SIGDN_PARENTRELATIVE": "Documents" } ``` ``` -------------------------------- ### GetIconFromImageList Source: https://context7.com/smourier/jumplistexplorer/llms.txt Retrieve the system icon associated with a shell item at various sizes. ```APIDOC ## GetIconFromImageList Retrieve the system icon associated with a shell item at various sizes. ### Method ```csharp using JumpListExplorer.Shell; using JumpListExplorer.Interop; using System.Drawing; var item = AutomaticDestinationList.GetItems("Microsoft.Windows.Explorer").First(); // Get small system icon (16x16) Icon? smallIcon = item.GetIconFromImageList(SHIL.SHIL_SYSSMALL); // Get large icon (32x32) Icon? largeIcon = item.GetIconFromImageList(SHIL.SHIL_LARGE); // Get extra large icon (48x48) Icon? extraLargeIcon = item.GetIconFromImageList(SHIL.SHIL_EXTRALARGE); // Use in Windows Forms if (smallIcon != null) { pictureBox.Image = smallIcon.ToBitmap(); } ``` ### Parameters - **size** (SHIL): An enumeration value specifying the desired icon size (e.g., `SHIL.SHIL_SYSSMALL`, `SHIL.SHIL_LARGE`). ### Response - **Icon?**: Returns an `Icon` object representing the system icon at the specified size, or `null` if the icon cannot be retrieved. ``` -------------------------------- ### Retrieve Jump List Items for an AUMID Source: https://context7.com/smourier/jumplistexplorer/llms.txt Fetches all jump list items (recent files/destinations) for a given Application User Model ID. Displays item name, path, date accessed, and size. ```csharp using JumpListExplorer.Shell; // Get all jump list items for Visual Studio Code string aumid = "Microsoft.VisualStudio.Code"; foreach (var item in AutomaticDestinationList.GetItems(aumid)) { Console.WriteLine($"Name: {item.SIGDN_NORMALDISPLAY}"); Console.WriteLine($"Path: {item.SIGDN_FILESYSPATH}"); Console.WriteLine($"Date Accessed: {item.DateAccessed:yyyy/MM/dd HH:mm:ss}"); Console.WriteLine($"Size: {item.Size} bytes"); Console.WriteLine("---"); // Example output: // Name: Program.cs // Path: C:\Projects\MyApp\Program.cs // Date Accessed: 2024/01/15 14:32:00 // Size: 2048 bytes } ``` -------------------------------- ### Retrieve Extended Shell Properties Source: https://context7.com/smourier/jumplistexplorer/llms.txt Fetch specific shell properties using PROPERTYKEYs with type safety or retrieve all properties as a dictionary. A default value can be provided for missing properties. ```csharp using JumpListExplorer.Shell; using JumpListExplorer.Interop; var item = AutomaticDestinationList.GetItems("Microsoft.Windows.Explorer").First(); // Get a specific property with type safety long? fileSize = item.GetProperty(PROPERTYKEY.System.Size); DateTime? dateModified = item.GetProperty(PROPERTYKEY.System.DateModified); // Get all properties as a dictionary var allProperties = item.GetProperties(GETPROPERTYSTOREFLAGS.GPS_DEFAULT); foreach (var kvp in allProperties) { Console.WriteLine($"{kvp.Key}: {kvp.Value}"); } // Get property with default value fallback string itemType = item.GetProperty(PROPERTYKEY.System.ItemType, "Unknown"); ``` -------------------------------- ### AutomaticDestinationList - GetItems Source: https://context7.com/smourier/jumplistexplorer/llms.txt Retrieves all jump list items (recent files/destinations) for a specific Application User Model ID. ```APIDOC ## GetItems ### Description Retrieves all jump list items (recent files/destinations) for a specific Application User Model ID. ### Method GET (conceptual, as it's a static method call) ### Endpoint N/A (static class method) ### Parameters #### Path Parameters - **aumid** (string) - Required - The Application User Model ID for which to retrieve jump list items. ### Request Example ```csharp using JumpListExplorer.Shell; // Get all jump list items for Visual Studio Code string aumid = "Microsoft.VisualStudio.Code"; foreach (var item in AutomaticDestinationList.GetItems(aumid)) { Console.WriteLine($"Name: {item.SIGDN_NORMALDISPLAY}"); Console.WriteLine($"Path: {item.SIGDN_FILESYSPATH}"); Console.WriteLine($"Date Accessed: {item.DateAccessed:yyyy/MM/dd HH:mm:ss}"); Console.WriteLine($"Size: {item.Size} bytes"); Console.WriteLine("---"); } ``` ### Response #### Success Response (200) - **items** (array of Item objects) - A list of jump list items. - **SIGDN_NORMALDISPLAY** (string) - The display name of the item. - **SIGDN_FILESYSPATH** (string) - The file system path of the item. - **DateAccessed** (DateTime) - The date and time the item was last accessed. - **Size** (long) - The size of the item in bytes. #### Response Example ```json [ { "SIGDN_NORMALDISPLAY": "Program.cs", "SIGDN_FILESYSPATH": "C:\\Projects\\MyApp\\Program.cs", "DateAccessed": "2024/01/15 14:32:00", "Size": 2048 } ] ``` ``` -------------------------------- ### File Metadata Properties Source: https://context7.com/smourier/jumplistexplorer/llms.txt Access file attributes and metadata through the Windows Shell property system. ```APIDOC ## File Metadata Properties Access file attributes and metadata through Windows Shell property system. ### Method ```csharp // Example usage within a C# context foreach (var item in AutomaticDestinationList.GetItems("Microsoft.Windows.Notepad")) { // Basic metadata Console.WriteLine($"Name: {item.SIGDN_NORMALDISPLAY}"); Console.WriteLine($"Type: {item.ItemTypeText}"); // e.g., "Text Document" Console.WriteLine($"Extension: {item.ItemType}"); // e.g., ".txt" Console.WriteLine($"Size: {item.Size} bytes"); // Date properties Console.WriteLine($"Created: {item.DateCreated}"); Console.WriteLine($"Modified: {item.DateModified}"); Console.WriteLine($"Accessed: {item.DateAccessed}"); // Attributes Console.WriteLine($"Is Folder: {item.IsFolder}"); Console.WriteLine($"Is Hidden: {item.IsHidden}"); Console.WriteLine($"Is ReadOnly: {item.IsReadOnly}"); // Parent folder if (item.Parent != null) { Console.WriteLine($"Parent: {item.Parent.SIGDN_FILESYSPATH}"); } } ``` ### Parameters None explicitly defined for this general access pattern, relies on `AutomaticDestinationList.GetItems`. ### Response Each `item` in the enumeration provides properties such as: - **SIGDN_NORMALDISPLAY** (string): The display name of the item. - **ItemTypeText** (string): The type of the item (e.g., "Text Document"). - **ItemType** (string): The file extension (e.g., ".txt"). - **Size** (long): The size of the item in bytes. - **DateCreated** (DateTime): The creation date and time. - **DateModified** (DateTime): The last modification date and time. - **DateAccessed** (DateTime): The last access date and time. - **IsFolder** (bool): True if the item is a folder. - **IsHidden** (bool): True if the item is hidden. - **IsReadOnly** (bool): True if the item is read-only. - **Parent** (Item): The parent item, if available. ``` -------------------------------- ### Enumerate Application User Model IDs Source: https://context7.com/smourier/jumplistexplorer/llms.txt Retrieves all Application User Model IDs (AUMIDs) that have associated jump list data. This is useful for discovering which applications have jump lists configured. ```csharp using JumpListExplorer.Shell; // Enumerate all application IDs with jump lists foreach (var aumid in AutomaticDestinationList.EnumerateAppUserModelIDs()) { Console.WriteLine($"Application ID: {aumid}"); // Example output: // Application ID: Microsoft.Windows.Explorer // Application ID: Microsoft.VisualStudio.Code // Application ID: Chrome } ``` -------------------------------- ### Enumerate Folder Children Source: https://context7.com/smourier/jumplistexplorer/llms.txt Iterate through all files and subfolders within a given folder. Supports filtering by type (folders/non-folders) and including hidden items using SHCONTF flags. ```csharp using JumpListExplorer.Shell; using JumpListExplorer.Interop; Folder desktop = Folder.Desktop; // Enumerate all children with default flags foreach (var child in desktop.Children) { string type = child.IsFolder ? "Folder" : "File"; Console.WriteLine($"[{type}] {child.SIGDN_NORMALDISPLAY}"); } // Enumerate with specific flags (include hidden items) var flags = SHCONTF.SHCONTF_FOLDERS | SHCONTF.SHCONTF_NONFOLDERS | SHCONTF.SHCONTF_INCLUDEHIDDEN; foreach (var child in desktop.EnumerateChildren(flags)) { Console.WriteLine($"{child.SIGDN_NORMALDISPLAY} (Hidden: {child.IsHidden})"); } ``` -------------------------------- ### Folder Class - EnumerateChildren Source: https://context7.com/smourier/jumplistexplorer/llms.txt Enumerate all child items (files and subfolders) within a folder. ```APIDOC ## Folder Class - EnumerateChildren Enumerate all child items (files and subfolders) within a folder. ### Method ```csharp using JumpListExplorer.Shell; using JumpListExplorer.Interop; Folder desktop = Folder.Desktop; // Enumerate all children with default flags foreach (var child in desktop.Children) { string type = child.IsFolder ? "Folder" : "File"; Console.WriteLine($"[{type}] {child.SIGDN_NORMALDISPLAY}"); } // Enumerate with specific flags (include hidden items) var flags = SHCONTF.SHCONTF_FOLDERS | SHCONTF.SHCONTF_NONFOLDERS | SHCONTF.SHCONTF_INCLUDEHIDDEN; foreach (var child in desktop.EnumerateChildren(flags)) { Console.WriteLine($"{child.SIGDN_NORMALDISPLAY} (Hidden: {child.IsHidden})"); } ``` ### Parameters - **flags** (SHCONTF): Optional flags to control the enumeration (e.g., `SHCONTF.SHCONTF_FOLDERS`, `SHCONTF.SHCONTF_NONFOLDERS`, `SHCONTF.SHCONTF_INCLUDEHIDDEN`). If not provided, default flags are used. ### Response - **IEnumerable**: An enumerable collection of `Item` objects representing the children of the folder. ``` -------------------------------- ### AutomaticDestinationList - EnumerateAppUserModelIDs Source: https://context7.com/smourier/jumplistexplorer/llms.txt Retrieves all Application User Model IDs (AUMIDs) that have associated jump list data. ```APIDOC ## EnumerateAppUserModelIDs ### Description Retrieves all Application User Model IDs that have associated jump list data from both the Windows Registry and ClassesRoot. ### Method GET (conceptual, as it's a static method call) ### Endpoint N/A (static class method) ### Parameters None ### Request Example ```csharp using JumpListExplorer.Shell; // Enumerate all application IDs with jump lists foreach (var aumid in AutomaticDestinationList.EnumerateAppUserModelIDs()) { Console.WriteLine($"Application ID: {aumid}"); } ``` ### Response #### Success Response (200) - **aumid** (string) - The Application User Model ID. #### Response Example ```json [ "Microsoft.Windows.Explorer", "Microsoft.VisualStudio.Code", "Chrome" ] ``` ``` -------------------------------- ### AutomaticDestinationList - RemoveItems Source: https://context7.com/smourier/jumplistexplorer/llms.txt Removes specified items from an application's jump list. ```APIDOC ## RemoveItems ### Description Removes specified items from an application's jump list. Returns the count of successfully removed items. ### Method DELETE (conceptual, as it's a static method call) ### Endpoint N/A (static class method) ### Parameters #### Path Parameters - **aumid** (string) - Required - The Application User Model ID from which to remove items. - **itemsToRemove** (array of Item objects) - Required - The list of jump list items to remove. ### Request Example ```csharp using JumpListExplorer.Shell; using System.IO; using System.Linq; string aumid = "Microsoft.VisualStudio.Code"; // Remove all jump list items pointing to non-existent files var itemsToRemove = AutomaticDestinationList.GetItems(aumid) .Where(item => { var path = item.SIGDN_FILESYSPATH; return path != null && !File.Exists(path) && !Directory.Exists(path); }) .ToList(); int removedCount = AutomaticDestinationList.RemoveItems(aumid, itemsToRemove); Console.WriteLine($"Removed {removedCount} stale jump list entries"); ``` ### Response #### Success Response (200) - **removedCount** (integer) - The number of jump list entries successfully removed. #### Response Example ```json { "removedCount": 5 } ``` ``` -------------------------------- ### Remove Stale Jump List Items Source: https://context7.com/smourier/jumplistexplorer/llms.txt Removes specified items from an application's jump list, particularly useful for cleaning up entries pointing to non-existent files or directories. Returns the count of successfully removed items. ```csharp using JumpListExplorer.Shell; using System.IO; using System.Linq; string aumid = "Microsoft.VisualStudio.Code"; // Remove all jump list items pointing to non-existent files var itemsToRemove = AutomaticDestinationList.GetItems(aumid) .Where(item => { var path = item.SIGDN_FILESYSPATH; return path != null && !File.Exists(path) && !Directory.Exists(path); }) .ToList(); int removedCount = AutomaticDestinationList.RemoveItems(aumid, itemsToRemove); Console.WriteLine($"Removed {removedCount} stale jump list entries"); // Example output: Removed 5 stale jump list entries ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.