Go to: Synopsis. Return value. Related. MEL examples.

Synopsis

freadAllText string

freadAllText is NOT undoable, NOT queryable, and NOT editable.

The freadAllText command reads all text from a file into a string.

Return value

stringCommand result

Related

freadAllLines, fwriteAllLines, fwriteAllText

MEL examples

// Read all text from a file into a string
//
string $exampleFileName = ( `internalVar -userTmpDir` + "example.tmp" );
string $allText = freadAllText($exampleFileName);
print($allText);