@Test public void testGetFile() throws Exception { FtpFileConnection conn = sample(); VirtualFile file = conn.getFile("marketdata-price.txt"); assertNotNull(file.openStream()); file = conn.getFile("marketdata-price1.txt"); assertNotNull(file.openStream()); conn.close(); }
public VirtualFile getFile(String path) { if(path == null) { return this.mountPoint; } String altPath = fileMapping.get(path); if (altPath != null) { path = altPath; } return this.mountPoint.getChild(path); }
FtpFileConnection implements VirtualFileConnection { public VirtualFile getFile(String path) { if(path == null) { return this.mountPoint; } String altPath = fileMapping.get(path); if (altPath != null) { path = altPath; } return this.mountPoint.getChild(path); } }
FtpFileConnection implements VirtualFileConnection { public VirtualFile getFile(String path) { if(path == null) { return this.mountPoint; } String altPath = fileMapping.get(path); if (altPath != null) { path = altPath; } return this.mountPoint.getChild(path); } FtpFileConnection(FtpConfiguration config); }
FtpFileConnection implements VirtualFileConnection { public VirtualFile getFile(String path) { if(path == null) { return this.mountPoint; } String altPath = fileMapping.get(path); if (altPath != null) { path = altPath; } return this.mountPoint.getChild(path); } FtpFileConnection(FtpConfiguration config); @Override void close(); @Override org.teiid.file.VirtualFile[] getFiles(String pattern); VirtualFile getFile(String path); @Override void add(InputStream in, String path); @Override boolean remove(String path); @Override boolean areFilesUsableAfterClose(); }
FtpFileConnection implements VirtualFileConnection { public VirtualFile getFile(String path) { if(path == null) { return this.mountPoint; } String altPath = fileMapping.get(path); if (altPath != null) { path = altPath; } return this.mountPoint.getChild(path); } FtpFileConnection(FtpConfiguration config); @Override void close(); @Override org.teiid.file.VirtualFile[] getFiles(String pattern); VirtualFile getFile(String path); @Override void add(InputStream in, String path); @Override boolean remove(String path); @Override boolean areFilesUsableAfterClose(); static final BundleUtil UTIL; }