Package jcifs.smb
Class DosFileFilter
- java.lang.Object
-
- jcifs.smb.DosFileFilter
-
- All Implemented Interfaces:
SmbFileFilter
public class DosFileFilter extends Object implements SmbFileFilter
-
-
Field Summary
Fields Modifier and Type Field Description protected int
attributes
protected String
wildcard
-
Constructor Summary
Constructors Constructor Description DosFileFilter(String wildcard, int attributes)
This filter can be considerably more efficient than other file filters as the specified wildcard and attributes are passed to the server for filtering there (although attributes are largely ignored by servers they are filtered locally by the default accept method).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(SmbFile file)
This returns true if the file's attributes contain any of the attributes specified for this filter.
-
-
-
Field Detail
-
wildcard
protected String wildcard
-
attributes
protected int attributes
-
-
Constructor Detail
-
DosFileFilter
public DosFileFilter(String wildcard, int attributes)
This filter can be considerably more efficient than other file filters as the specified wildcard and attributes are passed to the server for filtering there (although attributes are largely ignored by servers they are filtered locally by the default accept method).- Parameters:
wildcard
-attributes
-
-
-
Method Detail
-
accept
public boolean accept(SmbFile file) throws SmbException
This returns true if the file's attributes contain any of the attributes specified for this filter. The wildcard has no influence on this method as the server should have performed that filtering already. The attributes are asserted here only because server file systems may not support filtering by all attributes (e.g. even though ATTR_DIRECTORY was specified the server may still return objects that are not directories).- Specified by:
accept
in interfaceSmbFileFilter
- Returns:
- whether the given file should be included
- Throws:
SmbException
-
-