Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFFile.Download Method (String)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFFile.Download Method (String)
Downloads the file from the server to the specified path.

Namespace:  OSIsoft.AF.Asset
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public string Download(
	string path
)
Public Function Download ( 
	path As String
) As String

Dim instance As AFFile
Dim path As String
Dim returnValue As String

returnValue = instance.Download(path)
public:
String^ Download(
	String^ path
)
member Download : 
        path : string -> string 

Parameters

path
Type: SystemString
The path for the file downloaded from the server.

Return Value

Type: String
Returns the full path to the file that was downloaded from the server.

Remarks

If the Owner has been set, then the file is downloaded from the server. If the Owner has not been set, then the buffered file data will be returned.

The portions of the specified path that do not exist will be automatically created. The FileInfo.LastWriteTimeUtc of the created file will be set to the value of the ChangeDate property.

The rules for interpreting the path parameter are as follows:

  1. If path ends in a DirectorySeparatorChar, then the specified path is assumed to be a directory and the file's Name is automatically appended.
  2. Else if path exists and is a directory, then the file's Name is automatically appended to the path.
  3. Else if path exists and is a file, then the file is overwritten.
  4. Else if path does not exist, then it is assumed to be a file.

Version Information

AFSDK


See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in