Code example for FilenameFilter

Methods: accept

0
        public void onEvent(final int event, final String path) {
            if (event == 0x8000) {
                return; 
            } 
 
            if (!mFilter.accept(mDir, path)) {
                return; 
            } 
            mContext.runOnUiThread(new Runnable() {
                @Override 
                public void run() { 
                    switch (event & ALL_EVENTS) {
                        case MOVED_TO:
                        case CREATE:
                            incrementHeader(getFileSectionHeader(new File(mDir, path)));
                            add(path); // Notifies data set changed.
                            sort(mFileComparator);
 
                            break; 
                        case MOVED_FROM:
                        case DELETE: