passy / Android-DirectoryChooser

A directory chooser library for Android.
Apache License 2.0
515 stars 144 forks source link

Hidden directories are showing up. #103

Closed mohitYogi closed 3 years ago

mohitYogi commented 8 years ago

@passy I don't want directory chooser to show hidden files. I don't find any config for that. Any leads for that?

mohitYogi commented 8 years ago

@passy I think if you modify this one it can hide the hidden files.
private boolean isValidFile(final File file) { return (file != null && file.isDirectory() && file.canRead() && (mConfig.allowNewDirectoryNameModification() || file.canWrite()) && (mConfig.allowHiddenFiles() || file.toString().startsWith(".")) ); }
Where allowHiddenFiles() can return a config value given by user.

passy commented 8 years ago

I'd like to avoid adding more very specific options. I'd be open to have a generic filter interface that you could implement to filter out directories starting with a dot. Would you be interested in preparing a PR for that?

mohitYogi commented 8 years ago

sure.