Examples of PharFile


Examples of org.eclipse.php.internal.core.phar.PharFile

    overwriteExistingResourcesCheckbox.setFont(parent.getFont());
  }

  private boolean validateSourceFile(String fileName) {
    if (ArchiveFileManipulations.isPharFile(fileName)) {
      PharFile pharFile = getSpecifiedPharSourceFile(fileName);
      if (pharFile != null) {
        ArchiveFileManipulations.closePharFile(pharFile, getShell());
        return true;
      }
      return false;
View Full Code Here

Examples of org.eclipse.php.internal.core.phar.PharFile

    if (fileName.length() == 0) {
      return null;
    }

    try {
      return new PharFile(new File(fileName));
    } catch (PharException e) {
      displayErrorDialog(e.getLocalizedMessage());
    } catch (IOException e) {
      displayErrorDialog(PharImportMessages.ZipImport_couldNotRead);
    }
View Full Code Here

Examples of org.eclipse.php.internal.core.phar.PharFile

    }
    return ArchiveFileManipulations.closeTarFile(specifiedFile, getShell());
  }

  private boolean ensurePharSourceIsValid() {
    PharFile specifiedFile = getSpecifiedPharSourceFile();
    if (specifiedFile == null) {
      return false;
    }
    return ArchiveFileManipulations
        .closePharFile(specifiedFile, getShell());
View Full Code Here

Examples of org.eclipse.php.internal.core.phar.PharFile

   */
  protected MinimizedFileSystemElement getFileSystemTree() {
    disposeStructureProvider();
    // TODO FOR PHAR
    if (ArchiveFileManipulations.isPharFile(sourceNameField.getText())) {
      PharFile sourceTarFile = getSpecifiedPharSourceFile();
      if (sourceTarFile == null) {
        return null;
      }
      structureProvider = new PharLeveledStructureProvider(sourceTarFile);
      return selectFiles(structureProvider.getRoot(), structureProvider);
View Full Code Here

Examples of org.eclipse.php.internal.core.phar.PharFile

  protected boolean importResources(List fileSystemObjects) {
    // TODO FOR PHAR
    ILeveledImportStructureProvider importStructureProvider = null;
    if (ArchiveFileManipulations.isPharFile(sourceNameField.getText())) {
      if (ensurePharSourceIsValid()) {
        PharFile pharFile = getSpecifiedPharSourceFile();
        importStructureProvider = new PharLeveledStructureProvider(
            pharFile);
      }
    } else if (ArchiveFileManipulations
        .isTarFile(sourceNameField.getText())) {
View Full Code Here

Examples of org.eclipse.php.internal.core.phar.PharFile

  public static boolean isPharFile(String fileName) {
    if (fileName.length() == 0) {
      return false;
    }

    PharFile pharFile = null;
    try {
      pharFile = new PharFile(new File(fileName));
    } catch (PharException e) {
      return false;
    } catch (IOException ioException) {
      return false;
    } finally {
      if (pharFile != null) {
        try {
          pharFile.close();
        } catch (IOException e) {
          // ignore
        }
      }
    }
View Full Code Here

Examples of org.eclipse.php.internal.core.phar.PharFile

    protected void tearDown() throws Exception {
    }

    protected void runTest() throws Throwable {
      File tempPhar = exportTempPhar(pharFileFolder);
      compareContent(pharFileFolder, new PharFile(tempPhar));
      tempPhar.delete();
    }
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.