public static class FileUtilities.FileAttributeFilter
extends java.lang.Object
implements java.io.FileFilter
Note: To form a new instance of class FileAttributeFilter,please use one of the following file attribute's code or their combination:FileUtilities.FileAttribute.Type.NORMALFILE
FileUtilities.FileAttribute.Type.READONLYFILE
FileUtilities.FileAttribute.Type.HIDDENFILE
FileUtilities.FileAttribute.Type.SYSTEMFILE
FileUtilities.FileAttribute.Type.DIRECTORY
FileUtilities.FileAttribute.Type.ARCHIVEFILE
For example: //this filter will help to get all normal files, all hidden files and all archive files. FileAttributeFilter filter = new FileAttributeFilter(new FileAttribute(Type.HIDDENFILE).add(Type.ARCHIVEFILE)); If OS is other than Windows: 1. SYSTEMFILE will not have effect. 2. ARCHIVEFILE will only affect files which end with suffix listed in array ARCHIVEFILESUFFIX; Array ARCHIVEFILESUFFIX contains ".jar",".tar",".zip",".rar",".a",".ar",".gz",".tgz".
Modifier and Type | Field and Description |
---|---|
(package private) FileUtilities.FileAttribute |
expectedAttributes |
Constructor and Description |
---|
FileAttributeFilter(FileUtilities.FileAttribute attribute) |
FileAttributeFilter(int attributes) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.File pathname) |
FileUtilities.FileAttribute expectedAttributes
public FileAttributeFilter(int attributes) throws SAFSException
SAFSException
public FileAttributeFilter(FileUtilities.FileAttribute attribute) throws SAFSException
SAFSException
Copyright © SAS Institute. All Rights Reserved.