本文整理了Java中org.jboss.vfs.VFS.mountTemp()
方法的一些代码示例,展示了VFS.mountTemp()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VFS.mountTemp()
方法的具体详情如下:
包路径:org.jboss.vfs.VFS
类名称:VFS
方法名:mountTemp
[英]Create and mount a temporary file system, returning a single handle which will unmount and close the filesystem when closed.
[中]创建并挂载一个临时文件系统,返回一个句柄,该句柄将在文件系统关闭时卸载并关闭文件系统。
代码示例来源:origin: org.jboss.deployers/jboss-deployers-vfs
public void deploy(VFSDeploymentUnit unit) throws DeploymentException
{
try
{
VirtualFile classes = VFS.getChild(createHost(unit));
URL dynamicClassRoot = classes.toURL();
Closeable closeable = VFS.mountTemp(classes, tempFileProvider);
unit.addAttachment(MOUNT_HANDLE_KEY, closeable);
unit.addAttachment(DYNAMIC_CLASS_KEY, classes);
unit.addAttachment(DYNAMIC_CLASS_URL_KEY, dynamicClassRoot);
unit.prependClassPath(classes);
log.debug("Dynamic class root for " + unit.getName() + " is " + dynamicClassRoot);
}
catch (Exception e)
{
throw new DeploymentException("Error creating dynamic class root", e);
}
}
代码示例来源:origin: wildfly/wildfly-core
Closeable closable = VFS.mountTemp(file, TempFileProviderService.provider());
deploymentUnit.addToAttachmentList(MOUNTED_FILES, closable);
代码示例来源:origin: org.wildfly.core/wildfly-server
Closeable closable = VFS.mountTemp(file, TempFileProviderService.provider());
deploymentUnit.addToAttachmentList(MOUNTED_FILES, closable);
内容来源于网络,如有侵权,请联系作者删除!