This documentation is archived and is not being maintained.

VersionControlServer.GetItem Method (String)

This function is passed a string that represents a file or folder in Team Foundation Server, and returns an Item object that represents the current non-deleted version of that item. 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)

public Item GetItem(
	string path


Type: System.String

Return Value

Type: Microsoft.TeamFoundation.VersionControl.Client.Item
Returns an Item object for the specified item. If the item is not found, an exception occurs. You can avoid this exception by first calling ServerItemExists.


An exception is thrown if there is a wildcard character in Path.


An exception is thrown if the item was not found.

Wildcard characters are not allowed in path.