Ext.ReadTextFile()

(SBM On-Premise only) Opens, reads, and closes a file.

Function Signature

 string Ext.ReadTextFile( fileName )

Parameters

Parameter Type Description

fileName

string

Specifies a fully-qualified path and file name. The fileName can be any valid file path, including a path to a network device.

Note: This function may fail due to permissions settings. Verify that accounts that will execute the script have permission to read the destination file.

Return

Type Description

string

Returns string holding entire contents of file referred to by fileName.

Technical Details

SBM ModScript version: 11.3.

Notes

Concurrent scripts can read the same file simultaneously.

Important: This function assumes that the file is encoded in UTF-8.

Related Topics

Extension Functions