org.jboss.vfs.VFS.mount()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(144)

本文整理了Java中org.jboss.vfs.VFS.mount()方法的一些代码示例,展示了VFS.mount()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VFS.mount()方法的具体详情如下:
包路径:org.jboss.vfs.VFS
类名称:VFS
方法名:mount

VFS.mount介绍

[英]Mount a filesystem on a mount point in the VFS. The mount point is any valid file name, existent or non-existent. If a relative path is given, it will be treated as relative to the VFS root.
[中]

代码示例

代码示例来源:origin: org.jboss/jboss-vfs

private static MountHandle doMount(final FileSystem fileSystem, final VirtualFile mountPoint, Closeable... additionalCloseables) throws IOException {
  boolean ok = false;
  try {
    final Closeable mountHandle = mount(mountPoint, fileSystem);
    ok = true;
    return new BasicMountHandle(fileSystem, mountHandle, additionalCloseables);
  } finally {
    if (!ok) {
      VFSUtils.safeClose(fileSystem);
    }
  }
}

代码示例来源:origin: thorntail/thorntail

@Override
public void start(StartContext startContext) throws StartException {
  this.fsMount = VFS.getChild("wildfly-swarm-deployments");
  try {
    this.fsCloseable = VFS.mount(this.fsMount, this.fs);
  } catch (IOException e) {
    throw new StartException(e);
  }
}

代码示例来源:origin: io.thorntail/container

@Override
public void start(StartContext startContext) throws StartException {
  this.fsMount = VFS.getChild("wildfly-swarm-deployments");
  try {
    this.fsCloseable = VFS.mount(this.fsMount, this.fs);
  } catch (IOException e) {
    throw new StartException(e);
  }
}

代码示例来源:origin: org.wildfly.swarm/container

@Override
public void start(StartContext startContext) throws StartException {
  this.fsMount = VFS.getChild("wildfly-swarm-deployments");
  try {
    this.fsCloseable = VFS.mount(this.fsMount, this.fs);
  } catch (IOException e) {
    throw new StartException(e);
  }
}

代码示例来源:origin: org.teiid/teiid-engine

final Closeable c = VFS.mount(root, new PureZipFileSystem(f));

代码示例来源:origin: teiid/teiid

final Closeable c = VFS.mount(root, new PureZipFileSystem(f));

代码示例来源:origin: org.jboss.teiid/teiid-engine

final Closeable c = VFS.mount(root, new PureZipFileSystem(f));

代码示例来源:origin: org.teiid.connectors/connector-ftp

public FtpFileConnectionImpl(FTPClient client, String pathname, Map<String, String> fileMapping) throws ResourceException {
  this.client = client;
  if(fileMapping == null) {
    this.fileMapping = Collections.emptyMap();
  } else {
    this.fileMapping = fileMapping;
  }
  
  try {
    if(this.client.cwd(pathname) != 250) {
      throw new InvalidPropertyException(UTIL.getString("parentdirectory_not_set")); //$NON-NLS-1$
    }
    this.client.changeWorkingDirectory(pathname);
    this.mountPoint = VFS.getChild(pathname);
    this.closeable = VFS.mount(mountPoint, new FtpFileSystem(this.client));
  } catch (IOException e) {
    throw new ResourceException(UTIL.getString("vfs_mount_error", pathname), e); //$NON-NLS-1$
  }
}

代码示例来源:origin: org.teiid.wildfly.connectors/connector-ftp

public FtpFileConnectionImpl(FTPClient client, String pathname, Map<String, String> fileMapping) throws ResourceException {
  this.client = client;
  if(fileMapping == null) {
    this.fileMapping = Collections.emptyMap();
  } else {
    this.fileMapping = fileMapping;
  }
  
  try {
    if(this.client.cwd(pathname) != 250) {
      throw new InvalidPropertyException(UTIL.getString("parentdirectory_not_set")); //$NON-NLS-1$
    }
    this.client.changeWorkingDirectory(pathname);
    this.mountPoint = VFS.getChild(pathname);
    this.closeable = VFS.mount(mountPoint, new FtpFileSystem(this.client));
  } catch (IOException e) {
    throw new ResourceException(UTIL.getString("vfs_mount_error", pathname), e); //$NON-NLS-1$
  }
}

相关文章