IFileRepositoryService.DownloadData Method

The DownloadData method downloads the data.

Namespace – ABSuite.AccessLayer.Connector.Core

Assembly – Unisys.ABSuite.AccessLayer.Connector.Core (in Unisys.ABSuite.AccessLayer.Connector.Core.dll)

Syntax

byte[] DownloadData(
   string virtualPath
)

Argument

Return Value

This method returns the data from the server as a byte array.

Using the IFileRepositoryService Interface for the DownloadData Method

The following code is an example of using the DownloadData 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 that returns a byte array, which can be stored 
// as a file in a local directory. 
byte[] img = fileRepos.Download("Images\\JP.JPG");