private static IFileStore getFolderStore(IAdaptable destination) {
   IFileStore store = Utils.getFileStore(destination);
   IFileInfo info = Utils.getFileInfo(destination);
   if (store != null && info != null && !info.isDirectory()) {
     store = store.getParent();
   }
   return store;
 }
 public static String validateDestination(IAdaptable destination, IAdaptable[] sources) {
   IFileStore[] sourceStores = new IFileStore[sources.length];
   for (int i = 0; i < sourceStores.length; ++i) {
     sourceStores[i] = Utils.getFileStore(sources[i]);
   }
   return validateDestination(destination, sourceStores);
 }
 /**
  * Copies an array of sources to the destination location.
  *
  * @param sources the array of IAdaptable objects
  * @param destination the destination file store
  * @param listener an optional job listener
  */
 public void copyFiles(IAdaptable[] sources, IFileStore destination, IJobChangeListener listener) {
   IFileStore[] fileStores = new IFileStore[sources.length];
   for (int i = 0; i < fileStores.length; ++i) {
     fileStores[i] = Utils.getFileStore(sources[i]);
   }
   copyFiles(fileStores, destination, listener);
 }