+
+ /*
+ * Transfer files from Linux Tools directory.
+ */
+ File fOldFolder = XML_DIRECTORY_LEGACY.toFile();
+ if ((fOldFolder.isDirectory() && fOldFolder.exists())) {
+ for (File fromFile : fOldFolder.listFiles()) {
+ File toFile = pathToFiles.append(fromFile.getName()).toFile();
+ if (!toFile.exists() && !fromFile.isDirectory()) {
+ try (FileInputStream fis = new FileInputStream(fromFile);
+ FileOutputStream fos = new FileOutputStream(toFile);
+ FileChannel source = fis.getChannel();
+ FileChannel destination = fos.getChannel();) {
+ destination.transferFrom(source, 0, source.size());
+ } catch (IOException e) {
+ String error = Messages.XmlUtils_ErrorCopyingFile;
+ Activator.logError(error, e);
+ }
+ }
+ }
+ }
+