IFileRepositoryService.Download Method

The Download 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 Download(
   string virtualPath,
   string targetFolder = null
)

Argument

Return Value

This method returns a string containing the location of the downloaded file or data.

Using the IFileRepositoryService Interface for the Download Method

The following code is an example of using the Download() method:

// Declare the FileRepositoryService
IFileRepositoryService fileRepos =  FileRepositoryServiceFactory.Create();
 
// Specify the connection details for the repository access
FileRepositoryConnectionDetails fDetails = new FileRepositoryConnectionDetails();
fDetails.FileRepositoryDirectory = "\\\\au-papachj-5\\classes\\FREPOS";
 
// Connect to the File Repository Service
fileRepos.Connect(fDetails);
 
// Download an image which returns a byte array that can be stored as a file in a local directory. 
var file = fileRepos.Download("Images\\JP.JPG");