Examples of fetchInfo()


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

  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

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

  protected static IFileStore createFile(URI uri, String fileContent) throws CoreException {
    IFileStore outputFile = EFS.getStore(uri);
    outputFile.delete(EFS.NONE, null);
    InputStream input = new ByteArrayInputStream(fileContent.getBytes());
    transferData(input, outputFile.openOutputStream(EFS.NONE, null));
    IFileInfo info = outputFile.fetchInfo();
    assertTrue("Coudn't create file " + uri, info.exists() && !info.isDirectory());

    return outputFile;
  }
View Full Code Here

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

    // 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
View Full Code Here

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

    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();
    assertNotNull(users);
View Full Code Here

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

    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();
    assertNotNull(users);
View Full Code Here

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

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

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

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

    assertNotNull(users);

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

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

    // verify the invalid metadata folder has moved to the archive
    IFileStore archiveFolder = rootLocation.getChild(SimpleMetaStoreUtil.ARCHIVE);
    assertTrue(archiveFolder.fetchInfo().exists());
    assertTrue(archiveFolder.fetchInfo().isDirectory());
    IFileStore archivedOrgFolder = archiveFolder.getChild(orgFolderName);
    assertTrue(archivedOrgFolder.fetchInfo().exists());
    assertTrue(archivedOrgFolder.fetchInfo().isDirectory());
    assertFalse(orgFolder.fetchInfo().exists());
  }

  @Test
View Full Code Here

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

    IFileStore archiveFolder = rootLocation.getChild(SimpleMetaStoreUtil.ARCHIVE);
    assertTrue(archiveFolder.fetchInfo().exists());
    assertTrue(archiveFolder.fetchInfo().isDirectory());
    IFileStore archivedOrgFolder = archiveFolder.getChild(orgFolderName);
    assertTrue(archivedOrgFolder.fetchInfo().exists());
    assertTrue(archivedOrgFolder.fetchInfo().isDirectory());
    assertFalse(orgFolder.fetchInfo().exists());
  }

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

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);
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.