FileSystem.copyFile() This page was last modified over 30 day(s) ago and has 1 comment(s)


Back to FileSystem Class Summary

Availability
Windows, Mac OSX, Linux

Usage
mdm.FileSystem.copyFile(copyFrom:String, copyTo:String):Void

Parameters
copyFrom:String - File path of file to be copied
copyTo:String - File path of file to be created/overwritten

Returns
Boolean - status of operation

Description
Copies the specified file to the specified location. When error occurs during operation (for whatever reason) the false is returned by method. For example it could be returned if invalid path was passed as one of arguments

Notes
Please note that return type of that method is changed compared to version Zinc 3.0

Example Code
var copied:Boolean = mdm.FileSystem.copyFile(fromPath, toPath);
//
mdm.FileSystem.copyFile("c:\\myFile.txt", "c:\\Copy of myFile.txt");

mdm.FileSystem Class Example Downloads
No Example Downloads Available


User Comment by Allewar on 22nd August 2008 - 18:50
Since there's no "move" file command, how can I determine when a file has finished copying so I can delete the original file from its original path? It would be nice to have some events triggered here, but I certainly know this may be difficult.

Registered Users must be logged in to 'MyAccount' to add a Comment - Log In Here
  After Logging In, Click Here to Refresh This Page