ChildItemCmdletProviderIntrinsics.GetNames ChildItemCmdletProviderIntrinsics.GetNames Method

Definition

Overloads

GetNames(String, ReturnContainers, Boolean) GetNames(String, ReturnContainers, Boolean)

Gets the child names of the container at the given path.

GetNames(String[], ReturnContainers, Boolean, Boolean, Boolean) GetNames(String[], ReturnContainers, Boolean, Boolean, Boolean)

Gets the child names of the container at the given path.

GetNames(String[], ReturnContainers, Boolean, UInt32, Boolean, Boolean) GetNames(String[], ReturnContainers, Boolean, UInt32, Boolean, Boolean)

Gets the child names of the container at the given path.

GetNames(String, ReturnContainers, Boolean) GetNames(String, ReturnContainers, Boolean)

Gets the child names of the container at the given path.

public System.Collections.ObjectModel.Collection<string> GetNames (string path, System.Management.Automation.ReturnContainers returnContainers, bool recurse);
member this.GetNames : string * System.Management.Automation.ReturnContainers * bool -> System.Collections.ObjectModel.Collection<string>
Parameters
path
String String

The path to the item to retrieve. It may be a drive or provider-qualified path and may include glob characters.

returnContainers
ReturnContainers ReturnContainers

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

recurse
Boolean Boolean

If true, gets all the relative paths of all the children in all the sub-containers of the specified container. If false, only gets the immediate child names of the specified container.

Returns

The children of the container at the specified path. The type of the objects returned are determined by the provider that supports the given path.

Exceptions

If path or propertyToClear is null.

If the path refers to a provider that could not be found.

If the path refers to a drive that could not be found.

If path does not contain glob characters and could not be found.

If the provider that the path refers to does not support this operation.

If the provider threw an exception.

GetNames(String[], ReturnContainers, Boolean, Boolean, Boolean) GetNames(String[], ReturnContainers, Boolean, Boolean, Boolean)

Gets the child names of the container at the given path.

public System.Collections.ObjectModel.Collection<string> GetNames (string[] path, System.Management.Automation.ReturnContainers returnContainers, bool recurse, bool force, bool literalPath);
member this.GetNames : string[] * System.Management.Automation.ReturnContainers * bool * bool * bool -> System.Collections.ObjectModel.Collection<string>
Parameters
path
String[]

The path(s) to the item(s) to retrieve. They may be drive or provider-qualified paths and may include glob characters.

returnContainers
ReturnContainers ReturnContainers

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

recurse
Boolean Boolean

If true, gets all the relative paths of all the children in all the sub-containers of the specified container. If false, only gets the immediate child names of the specified container.

force
Boolean Boolean

Passed on to providers to force operations.

literalPath
Boolean Boolean

If true, globbing is not done on paths.

Returns

The children of the container at the specified path. The type of the objects returned are determined by the provider that supports the given path.

Exceptions

If path or propertyToClear is null.

If the path refers to a provider that could not be found.

If the path refers to a drive that could not be found.

If path does not contain glob characters and could not be found.

If the provider that the path refers to does not support this operation.

If the provider threw an exception.

GetNames(String[], ReturnContainers, Boolean, UInt32, Boolean, Boolean) GetNames(String[], ReturnContainers, Boolean, UInt32, Boolean, Boolean)

Gets the child names of the container at the given path.

public System.Collections.ObjectModel.Collection<string> GetNames (string[] path, System.Management.Automation.ReturnContainers returnContainers, bool recurse, uint depth, bool force, bool literalPath);
member this.GetNames : string[] * System.Management.Automation.ReturnContainers * bool * uint32 * bool * bool -> System.Collections.ObjectModel.Collection<string>
Parameters
path
String[]

The path(s) to the item(s) to retrieve. They may be drive or provider-qualified paths and may include glob characters.

returnContainers
ReturnContainers ReturnContainers

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

recurse
Boolean Boolean

If true, gets all the relative paths of all the children in all the sub-containers of the specified container. If false, only gets the immediate child names of the specified container.

depth
UInt32 UInt32

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

force
Boolean Boolean

Passed on to providers to force operations.

literalPath
Boolean Boolean

If true, globbing is not done on paths.

Returns

The children of the container at the specified path. The type of the objects returned are determined by the provider that supports the given path.

Exceptions

If path or propertyToClear is null.

If the path refers to a provider that could not be found.

If the path refers to a drive that could not be found.

If path does not contain glob characters and could not be found.

If the provider that the path refers to does not support this operation.

If the provider threw an exception.

Applies to