Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 /**
  * 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);
 }
Ejemplo n.º 3
0
 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;
 }