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); } } }
@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); } }
@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); } }
@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); } }
final Closeable c = VFS.mount(root, new PureZipFileSystem(f));
final Closeable c = VFS.mount(root, new PureZipFileSystem(f));
final Closeable c = VFS.mount(root, new PureZipFileSystem(f));
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$ } }
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$ } }