ContainerCmdletProvider.GetChildNames
Method
Definition
Gets names of the children of the specified path.
protected virtual void GetChildNames (string path, System.Management.Automation.ReturnContainers 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 <xref href="System.Management.Automation.Provider.ProviderCapabilities"></xref>
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 <code data-dev-comment-type="paramref">returnAllContainers</code> 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 <xref href="System.Management.Automation.PSNotSupportedException"></xref>.