DkmTransportConnection.DownloadFile Method

Definition

Overloads

DownloadFile(String, String, Boolean)

Download a file from the target computer. Note that this will copy the file content and last write time, but not attributes.

Location constraint: API must be called from an IDE component (component level > 100,000).

DownloadFile(DkmWorkList, String, String, Boolean, DkmCompletionRoutine<DkmDownloadFileAsyncResult>)

Download a file from the target computer. Note that this will copy the file content and last write time, but not attributes.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

Location constraint: API must be called from an IDE component (component level > 100,000).

DownloadFile(String, String, Boolean)

Download a file from the target computer. Note that this will copy the file content and last write time, but not attributes.

Location constraint: API must be called from an IDE component (component level > 100,000).

public:
 void DownloadFile(System::String ^ RemoteFilePath, System::String ^ LocalFilePath, bool OverwriteExisting);
public:
 void DownloadFile(Platform::String ^ RemoteFilePath, Platform::String ^ LocalFilePath, bool OverwriteExisting);
void DownloadFile(std::wstring const & RemoteFilePath, std::wstring const & LocalFilePath, bool OverwriteExisting);
public void DownloadFile (string RemoteFilePath, string LocalFilePath, bool OverwriteExisting);
member this.DownloadFile : string * string * bool -> unit
Public Sub DownloadFile (RemoteFilePath As String, LocalFilePath As String, OverwriteExisting As Boolean)

Parameters

RemoteFilePath
String

[In] Path to the remote file that will be written. Environment variables will be expanded (ex: %TMP%\deploy.txt).

LocalFilePath
String

[In] Local path where the download file will be placed. The path must be a full path, and the directory must already exist.

OverwriteExisting
Boolean

[In] true if the debugger should attempt to overwrite any existing file. This will fail if the existing file is read-only.

Applies to

DownloadFile(DkmWorkList, String, String, Boolean, DkmCompletionRoutine<DkmDownloadFileAsyncResult>)

Download a file from the target computer. Note that this will copy the file content and last write time, but not attributes.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

Location constraint: API must be called from an IDE component (component level > 100,000).

public:
 void DownloadFile(Microsoft::VisualStudio::Debugger::DkmWorkList ^ WorkList, System::String ^ RemoteFilePath, System::String ^ LocalFilePath, bool OverwriteExisting, Microsoft::VisualStudio::Debugger::DkmCompletionRoutine<Microsoft::VisualStudio::Debugger::DefaultPort::DkmDownloadFileAsyncResult> ^ CompletionRoutine);
public void DownloadFile (Microsoft.VisualStudio.Debugger.DkmWorkList WorkList, string RemoteFilePath, string LocalFilePath, bool OverwriteExisting, Microsoft.VisualStudio.Debugger.DkmCompletionRoutine<Microsoft.VisualStudio.Debugger.DefaultPort.DkmDownloadFileAsyncResult> CompletionRoutine);
member this.DownloadFile : Microsoft.VisualStudio.Debugger.DkmWorkList * string * string * bool * Microsoft.VisualStudio.Debugger.DkmCompletionRoutine<Microsoft.VisualStudio.Debugger.DefaultPort.DkmDownloadFileAsyncResult> -> unit
Public Sub DownloadFile (WorkList As DkmWorkList, RemoteFilePath As String, LocalFilePath As String, OverwriteExisting As Boolean, CompletionRoutine As DkmCompletionRoutine(Of DkmDownloadFileAsyncResult))

Parameters

WorkList
DkmWorkList

WorkList to append the new work item to.

RemoteFilePath
String

[In] Path to the remote file that will be written. Environment variables will be expanded (ex: %TMP%\deploy.txt).

LocalFilePath
String

[In] Local path where the download file will be placed. The path must be a full path, and the directory must already exist.

OverwriteExisting
Boolean

[In] true if the debugger should attempt to overwrite any existing file. This will fail if the existing file is read-only.

CompletionRoutine
DkmCompletionRoutine<DkmDownloadFileAsyncResult>

Routine to fire when the request is complete. If the request is successfully appended to the work list, this will always fire (including when the operation is canceled). This will never fire if appending the work item fails.

Applies to