Read File Activity

Description

This activity reads the text content of a file on the server. This activity should not be used to read binary content, such as an image, PDF or audio file, as this may produce unreadable content. The Read File Bytes activity should be used for reading binary content. Binary content is the raw numbers, known as bytes, that make up a file. More information on the difference between binary and text files can be found here.

Usage

The Read File activity could be used to read text data stored on the server, and then the Set Workflow Output activity could be used to deliver the result to a client workflow.

Inputs

Path

Required

Type: String

The path of the file to read on the server. The file system or network path must be valid and the server administrator must configure the appropriate permissions to allow reading of the file.

Attempting to read a file that does not exist will fail.

Encoding

Optional

Type: "ASCII" | "Unicode" | "utf-7" | "utf-8" | "utf-16" | "utf-16BE" | "utf-32" | String

The character encoding used to read the file content.

The encoding must be supported by the server or the workflow will fail with an error. If you do not specify an encoding, the server's default encoding will be used. More information on encodings can be found here.

Outputs

text

Required

Type: String

The text content of the file when read with the specified encoding.

Properties

For information about the ID, Display Name, and Description properties, see Properties Common to all Activities.

Connectivity Requirements

This activity does not work when the device has intermittent connectivity to the network.

See also...

The File.OpenRead(path) method.