Freigeben über


ChildItemCmdletProviderIntrinsics.GetNames Method

Definition

Overloads

GetNames(String, ReturnContainers, Boolean)

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

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

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

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

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

GetNames(String, ReturnContainers, Boolean)

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

public:
 System::Collections::ObjectModel::Collection<System::String ^> ^ GetNames(System::String ^ path, System::Management::Automation::ReturnContainers returnContainers, bool recurse);
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>
Public Function GetNames (path As String, returnContainers As ReturnContainers, recurse As Boolean) As Collection(Of String)

Parameters

path
String

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

returnContainers
ReturnContainers

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

recurse
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.

Applies to

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

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

public:
 System::Collections::ObjectModel::Collection<System::String ^> ^ GetNames(cli::array <System::String ^> ^ path, System::Management::Automation::ReturnContainers returnContainers, bool recurse, bool force, bool literalPath);
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>
Public Function GetNames (path As String(), returnContainers As ReturnContainers, recurse As Boolean, force As Boolean, literalPath As Boolean) As Collection(Of 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

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

recurse
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

Passed on to providers to force operations.

literalPath
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

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

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

public:
 System::Collections::ObjectModel::Collection<System::String ^> ^ GetNames(cli::array <System::String ^> ^ path, System::Management::Automation::ReturnContainers returnContainers, bool recurse, System::UInt32 depth, bool force, bool literalPath);
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>
Public Function GetNames (path As String(), returnContainers As ReturnContainers, recurse As Boolean, depth As UInteger, force As Boolean, literalPath As Boolean) As Collection(Of 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

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

recurse
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

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

force
Boolean

Passed on to providers to force operations.

literalPath
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