Package org.eclipse.core.filesystem

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


    // create a invalid metadata file
    IFileStore rootLocation = OrionConfiguration.getRootLocation();
    String orgFolderName = "te";
    IFileStore orgFolder = rootLocation.getChild(orgFolderName);
    assertTrue(orgFolder.fetchInfo().exists());
    assertTrue(orgFolder.fetchInfo().isDirectory());
    String invalid = "delete.html";
    IFileStore invalidFileInOrg = orgFolder.getChild(invalid);
    try {
      OutputStream outputStream = invalidFileInOrg.openOutputStream(EFS.NONE, null);
      outputStream.write("<!doctype html>".getBytes());
View Full Code Here


      outputStream.write("<!doctype html>".getBytes());
      outputStream.close();
    } catch (IOException e) {
      fail("Count not create a test file in the Orion Project:" + e.getLocalizedMessage());
    }
    assertTrue(invalidFileInOrg.fetchInfo().exists());

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

    List<String> users = metaStore.readAllUsers();
    assertNotNull(users);

    // verify the invalid metadata file has moved to the archive
    IFileStore archiveFolder = rootLocation.getChild(SimpleMetaStoreUtil.ARCHIVE);
    assertTrue(archiveFolder.fetchInfo().exists());
    assertTrue(archiveFolder.fetchInfo().isDirectory());
    IFileStore archiveOrgFolder = archiveFolder.getChild(orgFolderName);
    assertTrue(archiveOrgFolder.fetchInfo().exists());
    assertTrue(archiveOrgFolder.fetchInfo().isDirectory());
    IFileStore archivedFile = archiveOrgFolder.getChild(invalid);
View Full Code Here

    assertNotNull(users);

    // verify the invalid metadata file has moved to the archive
    IFileStore archiveFolder = rootLocation.getChild(SimpleMetaStoreUtil.ARCHIVE);
    assertTrue(archiveFolder.fetchInfo().exists());
    assertTrue(archiveFolder.fetchInfo().isDirectory());
    IFileStore archiveOrgFolder = archiveFolder.getChild(orgFolderName);
    assertTrue(archiveOrgFolder.fetchInfo().exists());
    assertTrue(archiveOrgFolder.fetchInfo().isDirectory());
    IFileStore archivedFile = archiveOrgFolder.getChild(invalid);
    assertTrue(archivedFile.fetchInfo().exists());
View Full Code Here

    // verify the invalid metadata file has moved to the archive
    IFileStore archiveFolder = rootLocation.getChild(SimpleMetaStoreUtil.ARCHIVE);
    assertTrue(archiveFolder.fetchInfo().exists());
    assertTrue(archiveFolder.fetchInfo().isDirectory());
    IFileStore archiveOrgFolder = archiveFolder.getChild(orgFolderName);
    assertTrue(archiveOrgFolder.fetchInfo().exists());
    assertTrue(archiveOrgFolder.fetchInfo().isDirectory());
    IFileStore archivedFile = archiveOrgFolder.getChild(invalid);
    assertTrue(archivedFile.fetchInfo().exists());
    assertFalse(invalidFileInOrg.fetchInfo().exists());
  }
View Full Code Here

    IFileStore archiveFolder = rootLocation.getChild(SimpleMetaStoreUtil.ARCHIVE);
    assertTrue(archiveFolder.fetchInfo().exists());
    assertTrue(archiveFolder.fetchInfo().isDirectory());
    IFileStore archiveOrgFolder = archiveFolder.getChild(orgFolderName);
    assertTrue(archiveOrgFolder.fetchInfo().exists());
    assertTrue(archiveOrgFolder.fetchInfo().isDirectory());
    IFileStore archivedFile = archiveOrgFolder.getChild(invalid);
    assertTrue(archivedFile.fetchInfo().exists());
    assertFalse(invalidFileInOrg.fetchInfo().exists());
  }
View Full Code Here

    assertTrue(archiveFolder.fetchInfo().isDirectory());
    IFileStore archiveOrgFolder = archiveFolder.getChild(orgFolderName);
    assertTrue(archiveOrgFolder.fetchInfo().exists());
    assertTrue(archiveOrgFolder.fetchInfo().isDirectory());
    IFileStore archivedFile = archiveOrgFolder.getChild(invalid);
    assertTrue(archivedFile.fetchInfo().exists());
    assertFalse(invalidFileInOrg.fetchInfo().exists());
  }

  @Test
  public void testArchiveInvalidMetaDataFileInServerWorkspaceRoot() throws CoreException {
View Full Code Here

      outputStream.write("<!doctype html>".getBytes());
      outputStream.close();
    } catch (IOException e) {
      fail("Count not create a test file in the Orion Project:" + e.getLocalizedMessage());
    }
    assertTrue(invalidFileAtRoot.fetchInfo().exists());

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

    List<String> users = metaStore.readAllUsers();
    assertNotNull(users);

    // verify the invalid metadata file has moved to the archive
    IFileStore archiveFolder = rootLocation.getChild(SimpleMetaStoreUtil.ARCHIVE);
    assertTrue(archiveFolder.fetchInfo().exists());
    assertTrue(archiveFolder.fetchInfo().isDirectory());
    IFileStore archivedFile = archiveFolder.getChild(invalid);
    assertTrue(archivedFile.fetchInfo().exists());
    assertFalse(invalidFileAtRoot.fetchInfo().exists());
  }
View Full Code Here

    assertNotNull(users);

    // verify the invalid metadata file has moved to the archive
    IFileStore archiveFolder = rootLocation.getChild(SimpleMetaStoreUtil.ARCHIVE);
    assertTrue(archiveFolder.fetchInfo().exists());
    assertTrue(archiveFolder.fetchInfo().isDirectory());
    IFileStore archivedFile = archiveFolder.getChild(invalid);
    assertTrue(archivedFile.fetchInfo().exists());
    assertFalse(invalidFileAtRoot.fetchInfo().exists());
  }
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.