| Previous | Next |
mFile.copyFolder()
Availability
| Support | PC | Mac | Package (AS3) / Scope (AS2) |
|---|---|---|---|
| ActionScript 3.0 | 4.0 or later | 4.0 or later | stm.mprojector.mFile |
| ActionScript 2.0 | 3.1.0 or later | 3.1.0 or later | global |
Usage
mFile.copyFolder(sourceFolder:String, destinationFolder:String[, replaceExistingFolder:Boolean]) : BooleanParameters
sourceFolder - Name (including the full path) of the folder to copy.
destinationFolder - Name (including the full path) of the destination folder.
replaceExistingFolder -
- if true, then any existing folder is overwritten.
- if false, then the function fails if the folder already exists.
Returns
A boolean.
Description
Method; Makes a copy of the specified folder. If you want progress information, use mFile.copyFolderAsynchronously()
ActionScript 3.0 Example:
The following example copies a folder named "images" from the application's directory to the desktop.
import stm.mprojector.mFile;
import stm.mprojector.mSystem;
var success:Boolean;
var workingDirPath:String;
var desktopPath:String;
var pathDelimiter = mSystem.getPathDelimiter();
sourcePath = mSystem.getSpecialFolder("MYAPP") + pathDelimiter + "images";
desktopPath = mSystem.getSpecialFolder("DESKTOP") + pathDelimiter + "images";
success = mFile.copyFolder(workingDirPath, desktopPath, true);ActionScript 2.0 Example:
The following example copies a folder named "images" from the application's directory to the desktop.
var success:Boolean;
var workingDirPath:String;
var desktopPath:String;
var pathDelimiter = mSystem.getPathDelimiter();
sourcePath = mSystem.getSpecialFolder("MYAPP") + pathDelimiter + "images";
desktopPath = mSystem.getSpecialFolder("DESKTOP") + pathDelimiter + "images";
success = mFile.copyFolder(workingDirPath, desktopPath, true);See Also
mFile.copyFolderAsynchronously()
| Questions or Feedback? | Previous | Next |
More Information
Getting Started
ActionScript 3.0 Support
- AS2 Migration
- Getting Started - Flash
- Debugging in Flash
- Building your application from inside Flash
- Getting Started - Flex
- Debugging in Flex
ActionScript 3.0 Samples
Using mProjector
- Using mProjector - Compile Your SWF into an Appli
- Customizing The About Window
- Debugging Your Application
- Launching Application at Startup
- Mac vs. Windows Application Development
- Menus
- Dynamic Window Creation
ActionScript 2.0 Samples
- Application Basics
- mProjector Class Basics
- Add Remove Programs Control Panel
- Fullscreen and Center
- Check Connection and Download File
- Choose Files
- Creating an Installer
- Creating and Controlling Multiple Windows
- Cut, Copy, and Paste (Windows)
- Desktop Shortcut and Start Menu Support
- Drag and Drop Files
- Embedding HTML and other Media types
- Flash-Shaped Windows
- Message Box
- Open Documents
- Project Files
- Reading and Writing to Hard Drive
- Startup Application
- Wallpaper and Screensaver
- Window to Window Communications
- Working with Included Files
- Context Sensitive Menus
- Alert User
- Screen Resolution
