STF.copyFile()

Availability

Flash MX 2004 or 8 swf w/ ScreenTimeScreenSaver component + ScreenTime 3.0 / 3.0

Usage

STF.copyFile(sourceFile:String, destinationFile:String) : Boolean

Parameters

sourceFile - Name of the file to copy. If a fully qualified path is not specified, the working directory is used.

destinationFile - Name of the destination file. If a fully qualified path is not specified, the working directory is used.

Returns

A boolean.; This value is returned as a parameter to the registered callback. See the example below or STF.registerCallBack() for more information on return variable handling.

Description

Method; Makes a copy of the specified file. If no path is specified, the working directory is used.

Example

The following example copies a file onto the desktop.

var success:Boolean;
onCopyFileReturn = function(returnValue:Boolean) {  // callback function
	success = returnValue;
}
STF.registerCallBack("copyFile", onCopyFileReturn, this);  // register callback function
STF.copyFile("File.txt", theDesktopDir +"/File.txt");

See Also

STF.createShortcut(), STF.deleteFile(), STF.downloadFile(), STF.listFiles(), STF.renameFile()