Share via


VersionControlServer.GetItems Method (String, RecursionType)

Gets a list of all items in the repository that matches the specified path. This search returns only the current versions of non-deleted items, but download information is not included. Without download information the function call is faster, but if you want to download files, you should use one of the overload methods that will allow you to get download information with the returned items.

Namespace:  Microsoft.TeamFoundation.VersionControl.Client
Assembly:  Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)

Syntax

'Declaration
Public Function GetItems ( _
    path As String, _
    recursion As RecursionType _
) As ItemSet
'Usage
Dim instance As VersionControlServer 
Dim path As String 
Dim recursion As RecursionType 
Dim returnValue As ItemSet 

returnValue = instance.GetItems(path, _
    recursion)
public ItemSet GetItems(
    string path,
    RecursionType recursion
)
public:
ItemSet^ GetItems(
    String^ path, 
    RecursionType recursion
)
public function GetItems(
    path : String, 
    recursion : RecursionType
) : ItemSet

Parameters

  • path
    Type: System.String

    The file or folder that you want to get. This may be a Team Foundation Server path ($/CmdLine/parse.cs) or a local path (C:\Code\CmdLine\parse.cs), in the latter case, the local path is mapped to a server path via a workspace. Wildcards are also supported.

  • recursion
    Type: Microsoft.TeamFoundation.VersionControl.Client.RecursionType

    The recursion parameter determines what files and folders will be considered to be getd. RecursionType.None gets the passed items only; if you passed in $/CmdLine then you will get only the folder $/CmdLine. RecursionType.OneLevel examines the passed items and, in the case of folders, their children; if you passed in $/CmdLine you will get the files and folders directly inside that folder. RecursionType.Full examines the full tree; if you passed in $/CmdLine/parser.cs you will get all files called parser.cs inside $/CmdLine or any folder under it.

Return Value

Type: Microsoft.TeamFoundation.VersionControl.Client.ItemSet
The returned ItemSet contains a QueryPath (which is null if the searched path was not valid), the matched pattern, and an array of Item objects for all the items that were getd.

Remarks

If the path argument is a file, it returns a set of Items that contains just that file. If the Path is a folder, it returns a set of Items that contains all items in that folder. If the Path contains a wildcard character, it returns a set of Items in the specified folder that matches the wildcard.

.NET Framework Security

See Also

Reference

VersionControlServer Class

VersionControlServer Members

GetItems Overload

Microsoft.TeamFoundation.VersionControl.Client Namespace