Share via


ItemCmdletProvider.IsValidPath(String) Method

Definition

Providers must override this method to verify the syntax and semantics of their paths.

protected:
 abstract bool IsValidPath(System::String ^ path);
protected:
 abstract bool IsValidPath(Platform::String ^ path);
 abstract bool IsValidPath(std::wstring const & path);
protected abstract bool IsValidPath (string path);
abstract member IsValidPath : string -> bool
Protected MustOverride Function IsValidPath (path As String) As Boolean

Parameters

path
String

The path to check for validity.

Returns

True if the path is syntactically and semantically valid for the provider, or false otherwise.

Remarks

This test should not verify the existence of the item at the path. It should only perform syntactic and semantic validation of the path. For instance, for the file system provider, that path should be canonicalized, syntactically verified, and ensure that the path does not refer to a device.

Applies to