@Override
            public SortedList<File> loadInBackground() {
                File[] listFiles = mCurrentPath.listFiles();
                final int initCap = listFiles == null ? 0 : listFiles.length;

                SortedList<File> files = new SortedList<>(File.class,
                        new SortedListAdapterCallback<File>(getDummyAdapter()) {
                            @Override
                            public int compare(File lhs, File rhs) {
                                return compareFiles(lhs, rhs);
                            }

                            @Override
                            public boolean areContentsTheSame(File file, File file2) {
                                return file.getAbsolutePath().equals(file2.getAbsolutePath()) && (file.isFile() == file2.isFile());
                            }

                            @Override
                            public boolean areItemsTheSame(File file, File file2) {
                                return areContentsTheSame(file, file2);
                            }
                        }, initCap);


                files.beginBatchedUpdates();
                if (listFiles != null) {
                    for (java.io.File f : listFiles) {
                        if (isItemVisible(f)) {
                            files.add(f);
                        }
                    }
                }
                files.endBatchedUpdates();

                return files;
            }
Get a loader that lists the Files in the current path,
and monitors changes.
android/modules/module_filepicker/src/main/java/com/nononsenseapps/filepicker/FilePickerFragment.java