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

Synopsis

freadAllLines string

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

The freadAllLines command reads all lines of text from a file into an array of strings.

Return value

string[]Lines of text

Related

freadAllText, fwriteAllLines, fwriteAllText

MEL examples

// Read all lines of text from a file into an array of strings
//
string $exampleFileName = ( `internalVar -userTmpDir` + "example.tmp" );
string $allLines[] = freadAllLines($exampleFileName);
string $line;
for($line in $allLines)
{
	print("Line: " + $line + "\n");
}