java.lang.Object
org.codelibs.jcifs.smb1.DosFileFilter
- All Implemented Interfaces:
SmbFileFilter
DOS-style file filter implementation for SMB1 protocol.
Filters files based on wildcard patterns and DOS file attributes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe DOS file attributes to filter on.protected StringThe wildcard pattern for filtering file names. -
Constructor Summary
ConstructorsConstructorDescriptionDosFileFilter(String wildcard, int attributes) Creates a DOS file filter with the specified wildcard and attributes. -
Method Summary
-
Field Details
-
wildcard
The wildcard pattern for filtering file names. -
attributes
protected int attributesThe DOS file attributes to filter on.
-
-
Constructor Details
-
DosFileFilter
Creates a DOS file filter with the specified wildcard and 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- the wildcard pattern for matching file names (e.g., "*.txt")attributes- the DOS file attributes to match (e.g., ATTR_DIRECTORY)
-
-
Method Details
-
accept
Description copied from interface:SmbFileFilterTests whether the specified SMB file should be included in a file list.- Specified by:
acceptin interfaceSmbFileFilter- Parameters:
file- the SMB file to test for inclusion- Returns:
- true if the file should be included, false otherwise
- Throws:
SmbException- if an error occurs while accessing the file
-