Partager via


ContainerCmdletProvider.GetChildItems Method

Definition

Overloads

GetChildItems(String, Boolean)

Gets the children of the item at the specified path.

GetChildItems(String, Boolean, UInt32)

Gets the children of the item at the specified path.

GetChildItems(String, Boolean)

Gets the children of the item at the specified path.

protected:
 virtual void GetChildItems(System::String ^ path, bool recurse);
protected:
 virtual void GetChildItems(Platform::String ^ path, bool recurse);
 virtual void GetChildItems(std::wstring const & path, bool recurse);
protected virtual void GetChildItems (string path, bool recurse);
abstract member GetChildItems : string * bool -> unit
override this.GetChildItems : string * bool -> unit
Protected Overridable Sub GetChildItems (path As String, recurse As Boolean)

Parameters

path
String

The path (or name in a flat namespace) to the item from which to retrieve the children.

recurse
Boolean

True if all children in a subtree should be retrieved, false if only a single level of children should be retrieved. This parameter should only be true for the NavigationCmdletProvider derived class.

Remarks

Providers override this method to give the user access to the provider objects using the get-childitem cmdlets.

Providers that declare ProviderCapabilities of ExpandWildcards, Filter, Include, or Exclude should ensure that the path passed meets those requirements by accessing the appropriate property from the base class.

By default overrides of this method should not write objects that are generally hidden from the user unless the Force property is set to true. For instance, the FileSystem provider should not call WriteItemObject for hidden or system files unless the Force property is set to true.

The provider implementation is responsible for preventing infinite recursion when there are circular links and the like. An appropriate terminating exception should be thrown if this situation occurs.

The default implementation of this method throws an PSNotSupportedException.

Applies to

GetChildItems(String, Boolean, UInt32)

Gets the children of the item at the specified path.

protected:
 virtual void GetChildItems(System::String ^ path, bool recurse, System::UInt32 depth);
protected:
 virtual void GetChildItems(Platform::String ^ path, bool recurse, unsigned int depth);
 virtual void GetChildItems(std::wstring const & path, bool recurse, unsigned int depth);
protected virtual void GetChildItems (string path, bool recurse, uint depth);
abstract member GetChildItems : string * bool * uint32 -> unit
override this.GetChildItems : string * bool * uint32 -> unit
Protected Overridable Sub GetChildItems (path As String, recurse As Boolean, depth As UInteger)

Parameters

path
String

The path (or name in a flat namespace) to the item from which to retrieve the children.

recurse
Boolean

True if all children in a subtree should be retrieved, false if only a single level of children should be retrieved. This parameter should only be true for the NavigationCmdletProvider derived class.

depth
UInt32

Limits the depth of recursion; uint.MaxValue performs full recursion.

Remarks

Providers override this method to give the user access to the provider objects using the get-childitem cmdlets.

Providers that declare ProviderCapabilities of ExpandWildcards, Filter, Include, or Exclude should ensure that the path passed meets those requirements by accessing the appropriate property from the base class.

By default overrides of this method should not write objects that are generally hidden from the user unless the Force property is set to true. For instance, the FileSystem provider should not call WriteItemObject for hidden or system files unless the Force property is set to true.

The provider implementation is responsible for preventing infinite recursion when there are circular links and the like. An appropriate terminating exception should be thrown if this situation occurs.

The default implementation of this method throws an PSNotSupportedException.

Applies to