Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

VersionControlServer.ServerItemExists Method (String, VersionSpec, DeletedState, ItemType)

Returns true if the server item of the specified type is in the database.

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

public bool ServerItemExists(
	string path,
	VersionSpec version,
	DeletedState deletedState,
	ItemType itemType
)

Parameters

path
Type: System.String
version
Type: Microsoft.TeamFoundation.VersionControl.Client.VersionSpec
deletedState
Type: Microsoft.TeamFoundation.VersionControl.Client.DeletedState

The DeletedState.NonDeleted from which you want to get a non-deleted item, the DeletedState.Deleted from which you want to search for a deleted item, or the DeletedState.Any from which returns the value true if either is found.

itemType
Type: Microsoft.TeamFoundation.VersionControl.Client.ItemType

The ItemType.Folder from which you want to search for a folder, the ItemType.File from which you want to search for a file, or the ItemType.Any from which returns the value true if either is found.

Return Value

Type: System.Boolean
true if the item is in the database, otherwise it is false.

Community Additions

ADD
Show:
© 2015 Microsoft