List all files in a directory using java

=======List all file with their names in a existing directory  on your hard disk=====
        String walkImageDir="C://MyDirectory//imageFiles";
         File dir = new File(imageDir);
                File[] imgFiles = dir.listFiles();
                System.out.println("===file dir size:"+imgFiles.length);
                for(File image: imgFiles){
                     System.out.println("====images are :"+image.getName());


Popular posts from this blog

Struts 2 - struts tag with boolean property

Can not connect to git using ssh (Permissions 0644 for '/root/.ssh/id_rsa' are too open.