The DownloadAsync method performs the download processing to return a file from the server as a string.
Namespace – ABSuite.AccessLayer.Connector.Core
Assembly – Unisys.ABSuite.AccessLayer.Connector.Core (in Unisys.ABSuite.AccessLayer.Connector.Core.dll)
Syntax
string DownloadAsync( string virtualPath, string targetFolder = null )
Arguments
virtualPath – System.String
This argument provides the path and filename of a specific file on the server.
targetFolder – System.String
This argument is optional. It specifies the path where the file is downloaded. If this argument is null, the file is downloaded to the File Repository Local folder.
Return Value
This method returns a string containing the location of the downloaded file or data.
Using the IFileRepositoryService Interface for the DownloadAsync Method
The following code is an example of using the DownloadAsync method:
fileRepos.Download("Images\\JP.JPG").ContinueWith((f) => { // Download completed… process the file If(Path.Exists(f.Result)... }