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

Synopsis

fwriteAllLines string string[]

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

The fwriteAllLines command writes all lines of text to a file. Existing files will be overwritten.

Return value

intZero if success

Related

freadAllLines, freadAllText, fwriteAllText

MEL examples

// Write lines of text to a file
//
string $exampleFileName = ( `internalVar -userTmpDir` + "example.tmp" );
string $linesToWrite[] = {"Hello there", "MEL user"};
int $result = fwriteAllLines($exampleFileName,$linesToWrite);