Search in sources :

Example 1 with ZipBundleFile

use of org.eclipse.osgi.storage.bundlefile.ZipBundleFile in project rt.equinox.framework by eclipse.

the class Storage method createBundleFile.

public BundleFile createBundleFile(File content, Generation generation, boolean isDirectory, boolean isBase) {
    BundleFile result;
    try {
        if (isDirectory) {
            boolean strictPath = Boolean.parseBoolean(equinoxContainer.getConfiguration().getConfiguration(EquinoxConfiguration.PROPERTY_STRICT_BUNDLE_ENTRY_PATH, Boolean.FALSE.toString()));
            result = new DirBundleFile(content, strictPath);
        } else {
            result = new ZipBundleFile(content, generation, mruList, getConfiguration().getDebug());
        }
    } catch (IOException e) {
        // $NON-NLS-1$
        throw new RuntimeException("Could not create bundle file.", e);
    }
    return wrapBundleFile(result, generation, isBase);
}
Also used : ZipBundleFile(org.eclipse.osgi.storage.bundlefile.ZipBundleFile) IOException(java.io.IOException) NestedDirBundleFile(org.eclipse.osgi.storage.bundlefile.NestedDirBundleFile) ZipBundleFile(org.eclipse.osgi.storage.bundlefile.ZipBundleFile) DirBundleFile(org.eclipse.osgi.storage.bundlefile.DirBundleFile) BundleFile(org.eclipse.osgi.storage.bundlefile.BundleFile) NestedDirBundleFile(org.eclipse.osgi.storage.bundlefile.NestedDirBundleFile) DirBundleFile(org.eclipse.osgi.storage.bundlefile.DirBundleFile)

Aggregations

IOException (java.io.IOException)1 BundleFile (org.eclipse.osgi.storage.bundlefile.BundleFile)1 DirBundleFile (org.eclipse.osgi.storage.bundlefile.DirBundleFile)1 NestedDirBundleFile (org.eclipse.osgi.storage.bundlefile.NestedDirBundleFile)1 ZipBundleFile (org.eclipse.osgi.storage.bundlefile.ZipBundleFile)1