Nevermind. I can use FileSystemManager's resolveFile(java.lang.String name, FileSystemOptions fileSystemOptions) method:
and pass the appropriate URI when needed. Thanks, Rai -----Original Message----- From: Rai Singh - PA [mailto:[EMAIL PROTECTED] Sent: Monday, February 20, 2006 3:41 PM To: [email protected] Subject: [VFS] Some basic questions I am trying to understand the correct usage of VFS such that I can connect to different servers via SFTP and return a single view across all servers. For instance, given that a directory (/home/foo/bar) exists on several servers (distinctly different machines) I want to perform the following against this directory: 1) search and retrieve attributes on several jar files across select servers 2) overwrite and delete jar files across select servers. Following an example posted on the Commons Wiki, I am able to see how I might do this for a single filesystem: defFileSysMgr = new DefaultFileSystemManager(); try { defFileSysMgr.addProvider("file", new DefaultLocalFileProvider()); defFileSysMgr.addProvider("zip", new ZipFileProvider()); defFileSysMgr.addProvider("jar", new JarFileProvider()); defFileSysMgr.init(); // Create the virtual file system VirtualFileSystem vfs = (VirtualFileSystem)defFileSysMgr.createVirtualFileSystem("vfs://") .getFileSystem(); searchableVfs = new SearchableVirtualFileSystem(vfs); } catch (FileSystemException e) { throw new SearchException("Unable to initialize the FileSystemManager.", e); } Where SearchableVirtualFileSystem simply adds filter and search capabilities. Is this usage recommended? Is there a way to: "connect to servers A, B, C, and D via SFTP, retrieve file information across all servers at one time and return FileObject instances for files in each SFTP session"? The reason for wanting to do this is so that I might be able to manage jar files that are deployed across several servers (not a cluster) in a given environment (development, staging, production). I would appreciate your help. Thanks, Rai --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
