How to not show hidden file and hide folder in ListView in android

I am tired of using fileexplorer when showing a hidden file and a hidden folder, but I can not show the hidden file and folder, please help me. Thanks in this code

for(File ff: dirs){
                Date lastModDate = new Date(ff.lastModified());
                DateFormat formater = DateFormat.getDateTimeInstance();
                String date_modify = formater.format(lastModDate);
                if(ff.isDirectory()) {
                        File[] fbuf = ff.listFiles();
                        int buf = 0;
                        if (fbuf != null) {
                            buf = fbuf.length;
                        } else buf = 0;
                        String num_item = String.valueOf(buf);
                        if (buf == 0) num_item = num_item + " item";
                        else num_item = num_item + " items";
//String formated = lastModDate.toString();
                        dir.add(new Item(ff.getName(), num_item, null, ff.getAbsolutePath(), "directory_icon"));
                    }
+4
source share

Source: https://habr.com/ru/post/1599627/


All Articles