Dela via


ContainerCmdletProvider.ConvertPath(String, String, String, String) Method

Definition

Gets a new provider-specific path and filter (if any) that corresponds to the given path.

protected:
 virtual bool ConvertPath(System::String ^ path, System::String ^ filter, System::String ^ % updatedPath, System::String ^ % updatedFilter);
 virtual bool ConvertPath(std::wstring const & path, std::wstring const & filter, std::wstring const & & updatedPath, std::wstring const & & updatedFilter);
protected virtual bool ConvertPath (string path, string filter, ref string updatedPath, ref string updatedFilter);
abstract member ConvertPath : string * string * string * string -> bool
override this.ConvertPath : string * string * string * string -> bool
Protected Overridable Function ConvertPath (path As String, filter As String, ByRef updatedPath As String, ByRef updatedFilter As String) As Boolean

Parameters

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.

Returns

True if the path or filter were altered. False otherwise.

Remarks

Providers override this method if they support a native filtering 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.

Applies to