Check out this answer to find out how to get the file / folder "from" the plugin.
Then create new files / folders in the projects and set the contents of the file using InputStream :
void copyFiles (File srcFolder, IContainer destFolder) { for (File f: srcFolder.listFiles()) { if (f.isDirectory()) { IFolder newFolder = destFolder.getFolder(new Path(f.getName())); newFolder.create(true, true, null); copyFiles(f, newFolder); } else { IFile newFile = destFolder.getFile(new Path(f.getName())); newFile.create(new FileInputStream(f), true, null); } } }
source share