mFile.appendString()

Availability

Windows: Flash 8 or 9 AS2.0 SWF + mProjector 3.0; Windows NT Support: Flash 7 SWF + mProjector 2.0;

Macintosh: Flash 8 or 9 AS2.0 SWF + mProjector 2.0; replacing mProjector 1.0 async

Usage

mFile.appendString(fileName:String, textToAppend:String) : Boolean

Parameters

fileName - Name of the file the string should be appended to. Platform Implementation Differences: On Windows the file name must include a fully qualified path. On the Mac if no path is specified, the working directory is used.

textToAppend - Text string to apppend.

Returns

A boolean.; ;

Description

Method; Writes the specified text string to a file by appending it to the existing content.

Example

The following example writes a string to a file in the applications working directory. Platform Implementation Differences: On Windows the file names must include an explicit path. On the Mac if no path is specified, the working directory is used.

var success:Boolean;
var filename:String = mSystem.getSpecialFolder("WORKING") + mSystem.getPathDelimiter() + "temp.txt";
success = mFile.appendString(fileName, stringToWrite);

See Also

mFile.writeString()

Code Examples

Reading and Writing to Hard Drive, Project Files, mProjector Class Basics -- mFile