Recursive Directory Copy for AIR


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. private function copyInto(directoryToCopy:File, locationCopyingTo:File):void
  2. {
  3. var directory:Array = directoryToCopy.getDirectoryListing();
  4.  
  5. for each (var f:File in directory)
  6. {
  7. if (f.isDirectory)
  8. copyInto(f, locationCopyingTo.resolvePath(f.name));
  9. else
  10. f.copyTo(locationCopyingTo.resolvePath(f.name), true);
  11. }
  12.  
  13. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.