VersionControlServer.GetItems Method (String, VersionSpec, RecursionType, DeletedState, ItemType)
Gets a list of all items in the repository that matches the specified path and version, but download information is not included, Without the download information the 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.
Assembly: Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)
'Declaration Public Function GetItems ( _ path As String, _ version As VersionSpec, _ recursion As RecursionType, _ deletedState As DeletedState, _ itemType As ItemType _ ) As ItemSet
'Usage Dim instance As VersionControlServer Dim path As String Dim version As VersionSpec Dim recursion As RecursionType Dim deletedState As DeletedState Dim itemType As ItemType Dim returnValue As ItemSet returnValue = instance.GetItems(path, _ version, recursion, deletedState, _ itemType)
public ItemSet GetItems( string path, VersionSpec version, RecursionType recursion, DeletedState deletedState, ItemType itemType )
public: ItemSet^ GetItems( String^ path, VersionSpec^ version, RecursionType recursion, DeletedState deletedState, ItemType itemType )
public function GetItems( path : String, version : VersionSpec, recursion : RecursionType, deletedState : DeletedState, itemType : ItemType ) : ItemSet
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.
The version of the passed item. (This is not necessarily the version numbers of the getd items. For instance, if you do a recursive GetItems on version 12 of $/CmdLine, you may get version 84 of $/CmdLine/parse.cs, and version 1 of $/CmdLine/output.cs, and continues in this pattern.) Use VersionSpec.Latest to get the current version of all items.
The recursion parameter determines what files and folders that you want to get. 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.
The DeletedState.NonDeleted from which you want to get non-deleted items, the DeletedState.Deleted from which you want to get deleted items, or the DeletedState.Any from which you want to get both.
This applies to the getd items, not to the items you passed in, so you could pass in a non-deleted folder, but want to get the deleted files in it.
The ItemType.Folder from which you want to get folders, the ItemType.File from which you want to get files, or the ItemType.Any from which you want to get both.
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.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.