Skip to content

format

typescript
File.ReadAllText(path)

class: File

description

Reads and returns all characters in the file at the specified path.

parameter

param_nametypedescription
pathstringThe path of the specified file.

return

typedescription
stringThe text content.

code example

javascript
function Test(file_path: string) {  
    try {
        let content = File.ReadAllText(file_path);
        Debug.log(content);
    } catch (error) {
        Debug.Error(error);
    }
}