本文整理汇总了Java中org.apache.commons.net.ftp.FTPFileFilter类的典型用法代码示例。如果您正苦于以下问题:Java FTPFileFilter类的具体用法?Java FTPFileFilter怎么用?Java FTPFileFilter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FTPFileFilter类属于org.apache.commons.net.ftp包,在下文中一共展示了FTPFileFilter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: listFiles
import org.apache.commons.net.ftp.FTPFileFilter; //导入依赖的package包/类
@Override
public Collection<FTPFile> listFiles( String pathname, FTPFileFilter filter )
throws IOException
{
return getClient().listFiles( pathname, filter );
}
示例2: forEach
import org.apache.commons.net.ftp.FTPFileFilter; //导入依赖的package包/类
/**
* List files in the specified directory, apply a filter then pass each one to a consumer
* <p>
* @param pathname directory name
* @param filter filter
* @param c Consumer
* <p>
* @throws IOException
*/
default void forEach( String pathname, FTPFileFilter filter, IOConsumer<FTPFile> c )
throws IOException
{
try {
forEachFile( pathname, filter, c.guard() );
}
catch( UncheckedIOException ex ) {
throw ex.getCause();
}
}
示例3: forEachMlist
import org.apache.commons.net.ftp.FTPFileFilter; //导入依赖的package包/类
default void forEachMlist( String pathname, FTPFileFilter filter, IOConsumer<FTPFile> c )
throws IOException
{
try {
forEachMlistDir( pathname, filter, c.guard() );
}
catch( UncheckedIOException ex ) {
throw ex.getCause();
}
}
示例4: getFiles
import org.apache.commons.net.ftp.FTPFileFilter; //导入依赖的package包/类
public FTPFile[] getFiles(FTPFileFilter filter) throws IOException {
ArrayList tmpResults = new ArrayList();
Iterator iter = this.entries.iterator();
while(iter.hasNext()) {
String entry = (String)iter.next();
FTPFile temp = this.parser.parseFTPEntry(entry);
if(filter.accept(temp)) {
tmpResults.add(temp);
}
}
return (FTPFile[])tmpResults.toArray(new FTPFile[tmpResults.size()]);
}
示例5: listFiles
import org.apache.commons.net.ftp.FTPFileFilter; //导入依赖的package包/类
public FTPFile[] listFiles(final String pathname, final FTPFileFilter filter) throws IOException {
if (pathname == null || filter == null) {
return null;
}
//
return execute(new FtpClientCallback<FTPFile[]>() {
public FTPFile[] doInAction(FtpClientSession session) throws FtpClientTemplateException {
try {
return session.listFiles(pathname, filter);
} catch (Exception ex) {
throw new FtpClientTemplateException(ex);
}
}
});
}
示例6: listFiles
import org.apache.commons.net.ftp.FTPFileFilter; //导入依赖的package包/类
public FTPFile[] listFiles(String pathname, FTPFileFilter filter) {
try {
return ftpClientTemplate.listFiles(pathname, filter);
} catch (Exception ex) {
throw new CommonFtoException(ex);
}
}
示例7: mlistDir
import org.apache.commons.net.ftp.FTPFileFilter; //导入依赖的package包/类
@Override
public Collection<FTPFile> mlistDir( String pathname, FTPFileFilter filter )
throws IOException
{
return Arrays.asList( ftp.mlistDir( pathname, filter ) );
}
示例8: listFiles
import org.apache.commons.net.ftp.FTPFileFilter; //导入依赖的package包/类
@Override
public Collection<FTPFile> listFiles( String pathname, FTPFileFilter filter )
throws IOException
{
return Arrays.asList( ftp.listFiles( pathname, filter ) );
}
示例9: files
import org.apache.commons.net.ftp.FTPFileFilter; //导入依赖的package包/类
default Stream<FTPFile> files( String pathname, FTPFileFilter filter )
throws IOException
{
return listFiles( pathname, filter ).stream();
}
示例10: mlistDir
import org.apache.commons.net.ftp.FTPFileFilter; //导入依赖的package包/类
Collection<FTPFile> mlistDir( String pathname, FTPFileFilter filter )
throws IOException;
示例11: forEachMlistDir
import org.apache.commons.net.ftp.FTPFileFilter; //导入依赖的package包/类
default void forEachMlistDir( String pathname, FTPFileFilter filter, Consumer<FTPFile> c )
throws IOException
{
CollectionUtils.forEach( mlistDir( pathname, filter ), c );
}
示例12: files
import org.apache.commons.net.ftp.FTPFileFilter; //导入依赖的package包/类
@Override
public Stream<FTPFile> files( String pathname, FTPFileFilter filter )
throws IOException
{
return getClient().files( pathname, filter );
}
示例13: forEachFile
import org.apache.commons.net.ftp.FTPFileFilter; //导入依赖的package包/类
@Override
public void forEachFile( String pathname, FTPFileFilter filter, Consumer<FTPFile> c )
throws IOException
{
getClient().forEachFile( pathname, filter, c );
}
示例14: forEach
import org.apache.commons.net.ftp.FTPFileFilter; //导入依赖的package包/类
@Override
public void forEach( FTPFileFilter filter, IOConsumer<FTPFile> c )
throws IOException
{
getClient().forEach( filter, c );
}
示例15: mlistDir
import org.apache.commons.net.ftp.FTPFileFilter; //导入依赖的package包/类
@Override
public Collection<FTPFile> mlistDir( String pathname, FTPFileFilter filter )
throws IOException
{
return getClient().mlistDir( pathname, filter );
}