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