Package org.eclipse.core.filesystem

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


    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


    String projectName = "Project";
    ProjectInfo projectInfo1 = new ProjectInfo();
    projectInfo1.setFullName(projectName);
    projectInfo1.setWorkspaceId(workspaceInfo.getUniqueId());
    IFileStore projectFolder = metaStore.getDefaultContentLocation(projectInfo1);
    assertFalse(projectFolder.fetchInfo().exists());
    projectInfo1.setContentLocation(projectFolder.toURI());
    metaStore.createProject(projectInfo1);
    assertTrue(projectFolder.fetchInfo().exists());

    // read the workspace
View Full Code Here

    projectInfo1.setWorkspaceId(workspaceInfo.getUniqueId());
    IFileStore projectFolder = metaStore.getDefaultContentLocation(projectInfo1);
    assertFalse(projectFolder.fetchInfo().exists());
    projectInfo1.setContentLocation(projectFolder.toURI());
    metaStore.createProject(projectInfo1);
    assertTrue(projectFolder.fetchInfo().exists());

    // read the workspace
    WorkspaceInfo readWorkspaceInfo = metaStore.readWorkspace(workspaceInfo.getUniqueId());
    assertNotNull(readWorkspaceInfo);
    assertEquals(readWorkspaceInfo.getFullName(), workspaceInfo.getFullName());
View Full Code Here

    IFileStore defaultLocation = metaStore.getDefaultContentLocation(projectInfo);
    // Test that the project is linked
    assertFalse(defaultLocation == projectInfo.getProjectStore());
    // Test that no content folder is created
    assertFalse(defaultLocation.fetchInfo().exists());
  }

  @Test
  public void testCreateSimpleUser() throws CoreException {
    // create the MetaStore
View Full Code Here

    String projectName = "Orion Project";
    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());
    projectInfo.setContentLocation(projectFolder.toURI());
    metaStore.createProject(projectInfo);
View Full Code Here

    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());
    projectInfo.setContentLocation(projectFolder.toURI());
    metaStore.createProject(projectInfo);

    // read the project
    ProjectInfo readProjectInfo = metaStore.readProject(workspaceInfo.getUniqueId(), projectInfo.getFullName());
View Full Code Here

    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());
    projectInfo.setContentLocation(projectFolder.toURI());
    metaStore.createProject(projectInfo);

    // read the project
    ProjectInfo readProjectInfo = metaStore.readProject(workspaceInfo.getUniqueId(), projectInfo.getFullName());
View Full Code Here

    metaStore.createProject(projectInfo);

    // create a project directory and file
    IFileStore projectFolder = projectInfo.getProjectStore();
    if (!projectFolder.fetchInfo().exists()) {
      projectFolder.mkdir(EFS.NONE, null);
    }
    assertTrue(projectFolder.fetchInfo().exists() && projectFolder.fetchInfo().isDirectory());
    String fileName = "file.html";
    IFileStore file = projectFolder.getChild(fileName);
View Full Code Here

    // create a project directory and file
    IFileStore projectFolder = projectInfo.getProjectStore();
    if (!projectFolder.fetchInfo().exists()) {
      projectFolder.mkdir(EFS.NONE, null);
    }
    assertTrue(projectFolder.fetchInfo().exists() && projectFolder.fetchInfo().isDirectory());
    String fileName = "file.html";
    IFileStore file = projectFolder.getChild(fileName);
    try {
      OutputStream outputStream = file.openOutputStream(EFS.NONE, null);
      outputStream.write("<!doctype html>".getBytes());
View Full Code Here

    // create a project directory and file
    IFileStore projectFolder = projectInfo.getProjectStore();
    if (!projectFolder.fetchInfo().exists()) {
      projectFolder.mkdir(EFS.NONE, null);
    }
    assertTrue(projectFolder.fetchInfo().exists() && projectFolder.fetchInfo().isDirectory());
    String fileName = "file.html";
    IFileStore file = projectFolder.getChild(fileName);
    try {
      OutputStream outputStream = file.openOutputStream(EFS.NONE, null);
      outputStream.write("<!doctype html>".getBytes());
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.