readFromTextFile

readFromTextFile

Syntax

readFromTextFile(path[, charset])

Package

file

Alias

 

Pkg Usage

readText(path[, charset])

Description

Read the text of the file.

Parameters

Parameter name

Type

Required

Description

Parameter name

Type

Required

Description

path

String

Yes

Specifies the file name to read from.

charset

String

No

Specifies the charset used to read that file. Available starting with SIL Engine 4.0.0.

Return Type

String

The text of the file

Example

string fileContent = readFromTextFile("C:/story.txt");

 

  1. You can use absolute paths and relative paths to "sil.home".

  2. If the file is not found, an error will be raised.

 

See also

Peacock

Need support? Create a request with our support team.

Copyright © 2005 - 2025 Appfire | All rights reserved.