@Override public boolean accepts(VirtualFile file) { return file.isFile(); } });
@Override public boolean accepts(final VirtualFile file) { return file.isFile() && file.getName().endsWith(".xml"); } }
public boolean accepts(VirtualFile vf) { if (vf == null) return false; if (vf.isFile()) { String fileName = vf.getName().toLowerCase(Locale.ENGLISH); if (fileName.endsWith(".a") || fileName.endsWith(".so") || fileName.endsWith(".dll")) { return true; } } return false; } }
private boolean isTldFile(VirtualFile file) { return file.isFile() && file.getName().toLowerCase(Locale.ENGLISH).endsWith(TLD); }
continue; else if (f.isFile()) { append(f, padding);
/** * Creates a {@link ResourceRoot} for the passed {@link VirtualFile file} and adds it to the list of {@link ResourceRoot}s * in the {@link DeploymentUnit deploymentUnit} * * @param deploymentUnit The deployment unit * @param file The file for which the resource root will be created * @param markAsSubDeployment If this is true, then the {@link ResourceRoot} that is created will be marked as a subdeployment * through a call to {@link SubDeploymentMarker#mark(org.jboss.as.server.deployment.module.ResourceRoot)} * @param explodeDuringMount If this is true then the {@link VirtualFile file} will be exploded during mount, * while creating the {@link ResourceRoot} * @return Returns the created {@link ResourceRoot} * @throws IOException */ private ResourceRoot createResourceRoot(final DeploymentUnit deploymentUnit, final VirtualFile file, final boolean markAsSubDeployment, final boolean explodeDuringMount) throws IOException { final boolean war = file.getName().toLowerCase(Locale.ENGLISH).endsWith(WAR_EXTENSION); final Closeable closable = file.isFile() ? mount(file, explodeDuringMount) : exportExplodedWar(war, file, deploymentUnit); final MountHandle mountHandle = new MountHandle(closable); final ResourceRoot resourceRoot = new ResourceRoot(file, mountHandle); deploymentUnit.addToAttachmentList(Attachments.RESOURCE_ROOTS, resourceRoot); if (markAsSubDeployment) { SubDeploymentMarker.mark(resourceRoot); } if (war) { resourceRoot.putAttachment(Attachments.INDEX_RESOURCE_ROOT, false); SubExplodedDeploymentMarker.mark(resourceRoot); } return resourceRoot; }
} else { VirtualFile beansXml = resourceRoot.getRoot().getChild(META_INF_BEANS_XML); if (beansXml.exists() && beansXml.isFile()) { WeldLogger.DEPLOYMENT_LOGGER.debugf("Found beans.xml: %s", beansXml.toString()); beanArchiveMetadata.put(resourceRoot, new ExplicitBeanArchiveMetadata(beansXml, resourceRoot, parseBeansXml(beansXml, parser, deploymentUnit), false)); final boolean rootBeansXmlPresent = rootBeansXml.exists() && rootBeansXml.isFile(); beansXml = classesRoot.getRoot().getChild(META_INF_BEANS_XML); final boolean beansXmlPresent = beansXml != null && beansXml.exists() && beansXml.isFile(); if (rootBeansXml.exists() && rootBeansXml.isFile()) { WeldLogger.DEPLOYMENT_LOGGER.debugf("Found beans.xml: %s", rootBeansXml.toString()); beanArchiveMetadata.put(deploymentRoot, new ExplicitBeanArchiveMetadata(rootBeansXml, deploymentRoot, parseBeansXml(rootBeansXml, parser, deploymentUnit), true));
if (resourceRoot.getRoot().getName().toLowerCase(Locale.ENGLISH).endsWith(".jar")) { VirtualFile webFragment = resourceRoot.getRoot().getChild(WEB_FRAGMENT_XML); if (webFragment.exists() && webFragment.isFile()) { InputStream is = null; try {
if(overlay != null) { overlay.remountAsZip(false); } else if (archive.isFile()) { closable = VFS.mountZip(archive, archive, TempFileProviderService.provider()); } else {
if(overlay != null) { overlay.remountAsZip(false); } else if(child.isFile()) { closable = VFS.mountZip(child, child, TempFileProviderService.provider());
if(overlay != null) { overlay.remountAsZip(false); } else if(child.isFile()) { closable = VFS.mountZip(child, child, TempFileProviderService.provider());
mountHandle = new MountHandle(null); } else { final Closeable closable = child.isFile() ? mount(child, false) : null; mountHandle = new MountHandle(closable);
public boolean accepts(VirtualFile file) { return file.isFile() && ProcessApplicationScanningUtil.isDeployable(file.getName(), additionalResourceSuffixes); } });
public boolean accepts(VirtualFile file) { return file.isFile() && ProcessApplicationScanningUtil.isDeployable(file.getName(), additionalResourceSuffixes); } });
@Override public boolean accepts(VirtualFile file) { return file.isFile(); } };
/** * Whether it is a simple leaf of the VFS, i.e. whether it can contain other files * * @return {@code true} if a simple file * @deprecated use {@link #isDirectory()} or {@link #isFile()} instead */ @Deprecated public boolean isLeaf() { return isFile(); }
@Override public boolean accepts(final VirtualFile file) { return file.isFile() && file.getName().endsWith(".xml"); } }
/** * {@inheritDoc} */ public boolean isFile(final VirtualFile mountPoint, final VirtualFile target) { final VirtualFile assemblyFile = assembly.getFile(mountPoint, target); return assemblyFile != null && assemblyFile.isFile(); }
public void visit(VirtualFile file) { if(file.isFile()) { accepts(file); } }