Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java get all directories in path

A very simple Java 8 solution:
File[] directories = new File("/your/path/").listFiles(File::isDirectory);

It's equivalent to using a FileFilter (works with older Java as well):
File[] directories = new File("/your/path/").listFiles(new FileFilter() {
    @Override
    public boolean accept(File file) {
        return file.isDirectory();
    }
});
Comment

PREVIOUS NEXT
Code Example
Java :: multiple type array java 
Java :: from string to double java 
Java :: iterable interface in java 
Java :: how to use deque as stack in java? 
Java :: junit vintage engine maven 
Java :: check if string is uuid 
Java :: counting repeated characters in a string in java 
Java :: android studio create a Uri 
Java :: Hourglass Java 
Java :: how to set radio button checked in android programmatically 
Java :: android get distance between two locations kotlin 
Java :: cls java 
Java :: java leap year 
Java :: find first element of list java 
Java :: copy elements of array in java 
Java :: sum of list java 
Java :: java replace first occurrence of substring 
Java :: code for checking android build version 
Java :: fill two dimensional array row by row java 
Java :: sudoku solver 
Java :: load a list from text file java 
Java :: repository query spring boot 
Java :: java math power 
Java :: file append in java 
Java :: declare class constant array java 
Java :: set textView.android:drawableEnd programmatically 
Java :: como ordenar un arraylist alfabeticamente en java 
Java :: java printf tab 
Java :: number format java 
Java :: java array print 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =