ContainerCmdletProvider.ConvertPath
Method
Definition
Gets a new provider-specific path and filter (if any) that corresponds to the given path.
protected virtual bool ConvertPath (string path, string filter, ref string updatedPath, ref string updatedFilter);
- path
- String
The path to the item. Unlike most other provider APIs, this path is likely to contain PowerShell wildcards.
- filter
- String
The provider-specific filter currently applied.
- updatedPath
- String
The new path to the item.
- updatedFilter
- String
The new filter.
True if the path or filter were altered. False otherwise.
Remarks
Providers override this method if they support a native filteing syntax that can offer performance improvements over wildcard matching done by the PowerShell engine. If the provider can handle a portion (or all) of the PowerShell wildcard with semantics equivalent to the PowerShell wildcard, it may adjust the path to exclude the PowerShell wildcard. If the provider can augment the PowerShell wildcard with an approximate filter (but not replace it entirely,) it may simply return a filter without modifying the path. In this situation, PowerShell's wildcarding will still be applied to a smaller result set, resulting in improved performance.
The default implementation of this method leaves both Path and Filter unmodified.
PowerShell wildcarding semantics are handled by the System.Management.Automation.Wildcardpattern
class.