mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-06-05 22:09:15 +02:00
hide hidden files and folders if set so
This commit is contained in:
@ -12,6 +12,7 @@ import android.widget.AdapterView;
|
|||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
|
|
||||||
import com.simplemobiletools.filemanager.Breadcrumbs;
|
import com.simplemobiletools.filemanager.Breadcrumbs;
|
||||||
|
import com.simplemobiletools.filemanager.Config;
|
||||||
import com.simplemobiletools.filemanager.R;
|
import com.simplemobiletools.filemanager.R;
|
||||||
import com.simplemobiletools.filemanager.Utils;
|
import com.simplemobiletools.filemanager.Utils;
|
||||||
import com.simplemobiletools.filemanager.adapters.ItemsAdapter;
|
import com.simplemobiletools.filemanager.adapters.ItemsAdapter;
|
||||||
@ -99,6 +100,7 @@ public class SelectFolderDialog extends DialogFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<FileDirItem> getItems(String path) {
|
private List<FileDirItem> getItems(String path) {
|
||||||
|
final boolean showHidden = Config.newInstance(getContext()).getShowHidden();
|
||||||
final List<FileDirItem> items = new ArrayList<>();
|
final List<FileDirItem> items = new ArrayList<>();
|
||||||
final File base = new File(path);
|
final File base = new File(path);
|
||||||
File[] files = base.listFiles();
|
File[] files = base.listFiles();
|
||||||
@ -107,6 +109,9 @@ public class SelectFolderDialog extends DialogFragment {
|
|||||||
if (!file.isDirectory())
|
if (!file.isDirectory())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (file.isHidden() && !showHidden)
|
||||||
|
continue;
|
||||||
|
|
||||||
final String curPath = file.getAbsolutePath();
|
final String curPath = file.getAbsolutePath();
|
||||||
final String curName = Utils.getFilename(curPath);
|
final String curName = Utils.getFilename(curPath);
|
||||||
int children = getChildren(file);
|
int children = getChildren(file);
|
||||||
|
Reference in New Issue
Block a user