Package org.eclipse.core.filesystem

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


  // see org.eclipse.orion.internal.server.servlets.workspace.WorkspaceResourceHandler.generateProjectLocation(WebProject, String)
  private static IFileStore getProjectStore(ProjectInfo project, String user) throws CoreException {
    IFileStore projectStore = OrionConfiguration.getMetaStore().getDefaultContentLocation(project);
    if (!projectStore.fetchInfo().exists()) {
      projectStore.mkdir(EFS.NONE, null);
    }
    return projectStore;
  }

  // clone
View Full Code Here


        if (!destinationRoot.isParentOf(destination) || hasExcludedParent(destination, destinationRoot, excludedFiles)) {
          //file should not be imported
          continue;
        }
        if (entry.isDirectory())
          destination.mkdir(EFS.NONE, null);
        else {
          if (!force && destination.fetchInfo().exists()) {
            filesFailed.add(entry.getName());
            continue;
          }
View Full Code Here

    if (location == null)
      throw new RuntimeException("Unable to compute base file system location"); //$NON-NLS-1$

    IFileStore rootStore = EFS.getLocalFileSystem().getStore(location);
    try {
      rootStore.mkdir(EFS.NONE, null);
      rootStoreURI = rootStore.toURI();
    } catch (CoreException e) {
      throw new RuntimeException("Instance location is read only: " + rootStore, e); //$NON-NLS-1$
    }
  }
View Full Code Here

        contentURI = new File(location).toURI();
      }
      if (init) {
        project.setContentLocation(contentURI);
        IFileStore child = NewFileServlet.getFileStore(request, project);
        child.mkdir(EFS.NONE, null);
      }
    }
    project.setContentLocation(contentURI);
  }
View Full Code Here

    IFileStore projectStore = OrionConfiguration.getMetaStore().getDefaultContentLocation(project);
    if (projectStore.fetchInfo().exists()) {
      //This folder must be empty initially or we risk showing another user's old private data
      projectStore.delete(EFS.NONE, null);
    }
    projectStore.mkdir(EFS.NONE, null);
    return projectStore.toURI();
  }

  /**
   * Returns the project for the given project metadata location. The expected format of the
View Full Code Here

   */
  protected IFileStore createDirectory(String path) throws CoreException {
    IFileInfo info = null;
    URI location = makeLocalPathAbsolute(path);
    IFileStore dir = EFS.getStore(location);
    dir.mkdir(EFS.NONE, null);
    info = dir.fetchInfo();
    assertTrue("Coudn't create directory " + path, info.exists() && info.isDirectory());

    return dir;
  }
View Full Code Here

    // create an empty organizational folder
    IFileStore rootLocation = OrionConfiguration.getRootLocation();
    String orgFolderName = "zz";
    IFileStore orgFolder = rootLocation.getChild(orgFolderName);
    assertFalse(orgFolder.fetchInfo().exists());
    orgFolder.mkdir(EFS.NONE, null);
    assertTrue(orgFolder.fetchInfo().exists());
    assertTrue(orgFolder.fetchInfo().isDirectory());

    // read all the users which will trigger the archive
    List<String> users = metaStore.readAllUsers();
View Full Code Here

    assertTrue(orgFolder.fetchInfo().exists());
    assertTrue(orgFolder.fetchInfo().isDirectory());
    String invalid = "delete.me";
    IFileStore invalidFolderInOrg = orgFolder.getChild(invalid);
    assertFalse(invalidFolderInOrg.fetchInfo().exists());
    invalidFolderInOrg.mkdir(EFS.NONE, null);
    assertTrue(invalidFolderInOrg.fetchInfo().exists());
    assertTrue(invalidFolderInOrg.fetchInfo().isDirectory());

    // read all the users which will trigger the archive
    List<String> users = metaStore.readAllUsers();
View Full Code Here

    // create a invalid metadata folder
    IFileStore rootLocation = OrionConfiguration.getRootLocation();
    String invalid = "delete.me";
    IFileStore invalidFolderAtRoot = rootLocation.getChild(invalid);
    assertFalse(invalidFolderAtRoot.fetchInfo().exists());
    invalidFolderAtRoot.mkdir(EFS.NONE, null);
    assertTrue(invalidFolderAtRoot.fetchInfo().exists());
    assertTrue(invalidFolderAtRoot.fetchInfo().isDirectory());

    // read all the users which will trigger the archive
    List<String> users = metaStore.readAllUsers();
View Full Code Here

    ProjectInfo projectInfo = new ProjectInfo();
    projectInfo.setFullName(projectName);
    projectInfo.setWorkspaceId(workspaceInfo.getUniqueId());
    IFileStore projectFolder = metaStore.getDefaultContentLocation(projectInfo);
    assertFalse(projectFolder.fetchInfo().exists());
    projectFolder.mkdir(EFS.NONE, null);
    assertTrue(projectFolder.fetchInfo().exists() && projectFolder.fetchInfo().isDirectory());

    // read the project, project json will be created
    ProjectInfo readProjectInfo = metaStore.readProject(workspaceInfo.getUniqueId(), projectName);
    assertNotNull(readProjectInfo);
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.