Export (0) Print
Expand All

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:
© 2014 Microsoft