Share via


ContainerCmdletProvider.GetChildNames(String, ReturnContainers) Method

Definition

Gets names of the children of the specified path.

protected:
 virtual void GetChildNames(System::String ^ path, System::Management::Automation::ReturnContainers returnContainers);
protected virtual void GetChildNames (string path, System.Management.Automation.ReturnContainers returnContainers);
abstract member GetChildNames : string * System.Management.Automation.ReturnContainers -> unit
override this.GetChildNames : string * System.Management.Automation.ReturnContainers -> unit
Protected Overridable Sub GetChildNames (path As String, returnContainers As ReturnContainers)

Parameters

path
String

The path to the item from which to retrieve the child names.

returnContainers
ReturnContainers

Determines if all containers should be returned or only those containers that match the filter(s).

Remarks

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

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. The exception to this is if returnAllContainers is true, then any child name for a container should be returned even if it doesn't match the Filter, Include, or Exclude.

By default overrides of this method should not write the names of 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