Package org.eclipse.core.filesystem

Examples of org.eclipse.core.filesystem.IFileStore.copy()


      }
      boolean allowOverwrite = (options & CREATE_NO_OVERWRITE) == 0;
      int efsOptions = allowOverwrite ? EFS.OVERWRITE : EFS.NONE;
      try {
        if (isCopy) {
          source.copy(toCreate, efsOptions, null);
        } else {
          source.move(toCreate, efsOptions, null);
          // Path format is /file/workspaceId/projectId/[location to folder]
          Path path = new Path(locationString);
          if (path.segmentCount() == 3 && path.segment(0).equals("file")) {
View Full Code Here


      // copy the default bashrc if one exists on this system
      File skelFile = new File("/etc/skel/.bashrc");
      IFileStore skel = EFS.getLocalFileSystem().fromLocalFile(skelFile);
      if (skel.fetchInfo().exists()) {
        skel.copy(bashrc, EFS.NONE, null);
      }
      File bashrcFile = bashrc.toLocalFile(EFS.NONE, null);

      // append lines to the bashrc
      String lines = new String("set -o vi\nPS1=\"\\u:\\w[\\!] % \"\n");
View Full Code Here

      //copy the project data from source
      ProjectInfo destinationProject = createProject(request, response, workspace, projectObject);
      String sourceName = source.getName();
      try {
        source.copy(destinationProject.getProjectStore(), EFS.OVERWRITE, null);
      } catch (CoreException e) {
        handleError(request, response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, NLS.bind("Error copying project {0} to {1}", sourceName, destinationName));
        return true;
      }
      URI baseLocation = getURI(request);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.