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.StringThe repository path ($/CmdLine/parser.cs) of the file that you want to download.
localFileName
Type: System.StringThe local path (C:\test\parser.cs) where the file's contents should be stored.
.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.