示例#1
0
 /* (non-Javadoc)
  * @see org.eclipse.core.filesystem.provider.FileStore#move(org.eclipse.core.filesystem.IFileStore, int, org.eclipse.core.runtime.IProgressMonitor)
  */
 @Override
 public void move(IFileStore destination, int options, IProgressMonitor monitor)
     throws CoreException {
   if (destination instanceof VirtualFile) {
     if (((VirtualFile) destination).toCanonicalURI().equals(toCanonicalURI())) {
       // nothing to do
       return;
     }
     if (((VirtualFile) destination).fileManager == fileManager) {
       fileManager.move(path, ((VirtualFile) destination).path, options, monitor);
       return;
     }
   }
   super.move(destination, options, monitor);
 }
示例#2
0
 /* (non-Javadoc)
  * @see org.eclipse.core.filesystem.provider.FileStore#copy(org.eclipse.core.filesystem.IFileStore, int, org.eclipse.core.runtime.IProgressMonitor)
  */
 @Override
 public void copy(IFileStore destination, int options, IProgressMonitor monitor)
     throws CoreException {
   if (CloakingUtils.isFileCloaked(this)) {
     // file is cloaked from transferring
     return;
   }
   if (destination instanceof VirtualFile) {
     if (((VirtualFile) destination).toCanonicalURI().equals(toCanonicalURI())) {
       // nothing to do
       return;
     }
     // TODO: max - special handling required (toLocalFile first)?
   }
   super.copy(destination, options, monitor);
 }