@Override
  public VirtualFileDiffElement copyTo(DiffElement<VirtualFile> container, String relativePath) {
    try {
      final File src = new File(myFile.getPath());
      final Path targetPath = Paths.get(container.getValue().getPath(), relativePath, src.getName());
      final File trg = targetPath.toFile();
      FileUtil.copy(src, trg);
      final VirtualFile virtualFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(trg);
      if (virtualFile != null) {
        VirtualFile diffRoot = container instanceof VirtualFileDiffElement ? ((VirtualFileDiffElement)container).getDiffRoot() : null;
        return new VirtualFileDiffElement(virtualFile, diffRoot);
      }
    }
    catch (InvalidPathException e) {
      LOGGER.error(e);
    }
    catch (IOException e) {//
    }
    return null;
  }
@Override
  public VirtualFileDiffElement copyTo(DiffElement<VirtualFile> container, String relativePath)