@Test(expected = TranslatorException.class) public void testGetFiles() throws Exception { FtpFileConnection conn = sample(); conn.getFiles("*.txt"); }
@Override public org.teiid.file.VirtualFile[] getFiles(String pattern) { pattern = checkPattern(pattern); VirtualFile file = this.getFile(pattern); if (file.isDirectory()) { List<VirtualFile> children = file.getChildren(); org.teiid.file.VirtualFile[] result = new org.teiid.file.VirtualFile[children.size()]; for (int i = 0; i < result.length; i++) { result[i] = new JBossVirtualFile(children.get(i)); } return result; } if(file.exists()) { return new org.teiid.file.VirtualFile[]{new JBossVirtualFile(file)}; } return null; }
FtpFileConnection implements VirtualFileConnection { @Override public org.teiid.file.VirtualFile[] getFiles(String pattern) { pattern = checkPattern(pattern); VirtualFile file = this.getFile(pattern); if (file.isDirectory()) { List<VirtualFile> children = file.getChildren(); org.teiid.file.VirtualFile[] result = new org.teiid.file.VirtualFile[children.size()]; for (int i = 0; i < result.length; i++) { result[i] = new JBossVirtualFile(children.get(i)); } return result; } if(file.exists()) { return new org.teiid.file.VirtualFile[]{new JBossVirtualFile(file)}; } return null; } }
FtpFileConnection implements VirtualFileConnection { @Override public org.teiid.file.VirtualFile[] getFiles(String pattern) { pattern = checkPattern(pattern); VirtualFile file = this.getFile(pattern); if (file.isDirectory()) { List<VirtualFile> children = file.getChildren(); org.teiid.file.VirtualFile[] result = new org.teiid.file.VirtualFile[children.size()]; for (int i = 0; i < result.length; i++) { result[i] = new JBossVirtualFile(children.get(i)); } return result; } if(file.exists()) { return new org.teiid.file.VirtualFile[]{new JBossVirtualFile(file)}; } return null; } FtpFileConnection(FtpConfiguration config); }
FtpFileConnection implements VirtualFileConnection { @Override public org.teiid.file.VirtualFile[] getFiles(String pattern) { pattern = checkPattern(pattern); VirtualFile file = this.getFile(pattern); if (file.isDirectory()) { List<VirtualFile> children = file.getChildren(); org.teiid.file.VirtualFile[] result = new org.teiid.file.VirtualFile[children.size()]; for (int i = 0; i < result.length; i++) { result[i] = new JBossVirtualFile(children.get(i)); } return result; } if(file.exists()) { return new org.teiid.file.VirtualFile[]{new JBossVirtualFile(file)}; } return null; } 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 { @Override public org.teiid.file.VirtualFile[] getFiles(String pattern) { pattern = checkPattern(pattern); VirtualFile file = this.getFile(pattern); if (file.isDirectory()) { List<VirtualFile> children = file.getChildren(); org.teiid.file.VirtualFile[] result = new org.teiid.file.VirtualFile[children.size()]; for (int i = 0; i < result.length; i++) { result[i] = new JBossVirtualFile(children.get(i)); } return result; } if(file.exists()) { return new org.teiid.file.VirtualFile[]{new JBossVirtualFile(file)}; } return null; } 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; }