VersionControlServer.DownloadFile Method (String, String)

Downloads a file from Team Foundation Server and places its contents in a local file. This function only works on the most recent, non-deleted version of a file; there is an overload method that can download an old or deleted file.

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

Syntax

'Declaration
Public Sub DownloadFile ( _
    serverPath As String, _
    localFileName As String _
)
'Usage
Dim instance As VersionControlServer 
Dim serverPath As String 
Dim localFileName As String

instance.DownloadFile(serverPath, localFileName)
public void DownloadFile(
    string serverPath,
    string localFileName
)
public:
void DownloadFile(
    String^ serverPath, 
    String^ localFileName
)
public function DownloadFile(
    serverPath : String, 
    localFileName : String
)

Parameters

  • serverPath
    Type: System.String

    The repository path ($/CmdLine/parser.cs) of the file that you want to download.

  • localFileName
    Type: System.String

    The local path (C:\test\parser.cs) where the file's contents should be stored.

.NET Framework Security

See Also

Reference

VersionControlServer Class

VersionControlServer Members

DownloadFile Overload

Microsoft.TeamFoundation.VersionControl.Client Namespace