private static Closeable mount(VirtualFile moduleFile, boolean explode) throws IOException { return explode ? VFS.mountZipExpanded(moduleFile, moduleFile, TempFileProviderService.provider()) : VFS.mountZip(moduleFile, moduleFile, TempFileProviderService.provider()); }
static MountHandle extractArchive(File archive, TempFileProvider tempFileProvider, String name) throws IOException { return ((MountHandle) VFS.mountZipExpanded(archive, VFS.getChild(name), tempFileProvider)); }
static MountHandle extractArchive(File archive, TempFileProvider tempFileProvider, String name) throws IOException { return ((MountHandle) VFS.mountZipExpanded(archive, VFS.getChild(name), tempFileProvider)); }
protected MountHandle extractArchive(File archive, TempFileProvider tempFileProvider) throws IOException { return ((MountHandle)VFS.mountZipExpanded(archive, VFS.getChild("cli"), tempFileProvider)); }
protected MountHandle extractArchive(File archive, TempFileProvider tempFileProvider) throws IOException { return ((MountHandle)VFS.mountZipExpanded(archive, VFS.getChild("cli"), tempFileProvider)); }
public void remountAsZip(boolean expanded) throws IOException { IoUtils.safeClose(closeable); if(expanded) { closeable = VFS.mountZipExpanded(realFile, mountPoint, tempFileProvider); } else { closeable = VFS.mountZip(realFile, mountPoint, tempFileProvider); } }
public void remountAsZip(boolean expanded) throws IOException { IoUtils.safeClose(closeable); if(expanded) { closeable = VFS.mountZipExpanded(realFile, mountPoint, tempFileProvider); } else { closeable = VFS.mountZip(realFile, mountPoint, tempFileProvider); } }
/** * Create and mount an expanded zip file in a temporary file system, returning a single handle which will unmount and * close the filesystem when closed. The given zip data stream is closed. * * @param zipFile a zip file in the VFS * @param mountPoint the point at which the filesystem should be mounted * @param tempFileProvider the temporary file provider * @return a handle * @throws IOException if an error occurs */ public static Closeable mountZipExpanded(VirtualFile zipFile, VirtualFile mountPoint, TempFileProvider tempFileProvider) throws IOException { return mountZipExpanded(zipFile.openStream(), zipFile.getName(), mountPoint, tempFileProvider); }
public void remountAsZip(boolean expanded) throws IOException { IoUtils.safeClose(closeable); if(expanded) { closeable = VFS.mountZipExpanded(realFile, mountPoint, tempFileProvider); } else { closeable = VFS.mountZip(realFile, mountPoint, tempFileProvider); } }
private void mount(VirtualFile target, MountConfig mountConfig) throws IOException { if (mounted.compareAndSet(false, true)) { if (target.isFile()) { VFSLogger.ROOT_LOGGER.debugf("Automounting: %s with options %s", target, mountConfig); final TempFileProvider provider = getTempFileProvider(); if (mountConfig.mountExpanded()) { if (mountConfig.copyTarget()) { handles.add(VFS.mountZipExpanded(target, target, provider)); } else { handles.add(VFS.mountZipExpanded(target.getPhysicalFile(), target, provider)); } } else { if (mountConfig.copyTarget()) { handles.add(VFS.mountZip(target, target, provider)); } else { handles.add(VFS.mountZip(target.getPhysicalFile(), target, provider)); } } } } }
private static Closeable mount(VirtualFile moduleFile, boolean explode) throws IOException { return explode ? VFS.mountZipExpanded(moduleFile, moduleFile, TempFileProviderService.provider()) : VFS.mountZip(moduleFile, moduleFile, TempFileProviderService.provider()); }
private static Closeable mount(VirtualFile moduleFile, boolean explode) throws IOException { return explode ? VFS.mountZipExpanded(moduleFile, moduleFile, TempFileProviderService.provider()) : VFS.mountZip(moduleFile, moduleFile, TempFileProviderService.provider()); }
private static Closeable mount(VirtualFile moduleFile, boolean explode) throws IOException { return explode ? VFS.mountZipExpanded( moduleFile, moduleFile, TempFileProviderService.provider() ) : VFS.mountZip( moduleFile, moduleFile, TempFileProviderService.provider() ); }
private static Closeable mount(VirtualFile moduleFile, boolean explode) throws IOException { return explode ? VFS.mountZipExpanded(moduleFile, moduleFile, TempFileProviderService.provider()) : VFS.mountZip(moduleFile, moduleFile, TempFileProviderService.provider()); }
private static Closeable mount(VirtualFile moduleFile, boolean explode) throws DeploymentUnitProcessingException { try { return explode ? VFS.mountZipExpanded(moduleFile, moduleFile, TempFileProviderService.provider()) : VFS.mountZip(moduleFile, moduleFile, TempFileProviderService.provider()); } catch (IOException e) { throw new DeploymentUnitProcessingException(e); } }
Closeable closeable = VFS.mountZipExpanded(in, deployment.getName(), mountPoint, tempFileProvider); this.mountPoints.add(closeable);
@Override public Closeable mountDeploymentContent(final VirtualFile contents, VirtualFile mountPoint, MountType type) throws IOException { // according to the javadoc contents can not be null assert contents != null : "null contents"; switch (type) { case ZIP: return VFS.mountZip(contents, mountPoint, tempFileProvider); case EXPANDED: return VFS.mountZipExpanded(contents, mountPoint, tempFileProvider); case REAL: return VFS.mountReal(contents.getPhysicalFile(), mountPoint); default: throw ServerLogger.ROOT_LOGGER.unknownMountType(type); } }
@Override public Closeable mountDeploymentContent(final VirtualFile contents, VirtualFile mountPoint, MountType type) throws IOException { // according to the javadoc contents can not be null assert contents != null : "null contents"; switch (type) { case ZIP: return VFS.mountZip(contents, mountPoint, tempFileProvider); case EXPANDED: return VFS.mountZipExpanded(contents, mountPoint, tempFileProvider); case REAL: return VFS.mountReal(contents.getPhysicalFile(), mountPoint); default: throw ServerMessages.MESSAGES.unknownMountType(type); } }
@Override public Closeable mountDeploymentContent(final VirtualFile contents, VirtualFile mountPoint, MountType type) throws IOException { // according to the javadoc contents can not be null assert contents != null : "null contents"; switch (type) { case ZIP: return VFS.mountZip(contents, mountPoint, tempFileProvider); case EXPANDED: return VFS.mountZipExpanded(contents, mountPoint, tempFileProvider); case REAL: return VFS.mountReal(contents.getPhysicalFile(), mountPoint); default: throw ServerLogger.ROOT_LOGGER.unknownMountType(type); } }
@Override public Closeable mountDeploymentContent(final VirtualFile contents, VirtualFile mountPoint, MountType type) throws IOException { // according to the javadoc contents can not be null assert contents != null : "null contents"; switch (type) { case ZIP: return VFS.mountZip(contents, mountPoint, tempFileProvider); case EXPANDED: return VFS.mountZipExpanded(contents, mountPoint, tempFileProvider); case REAL: return VFS.mountReal(contents.getPhysicalFile(), mountPoint); default: throw ServerMessages.MESSAGES.unknownMountType(type); } }