java get folder content

Java
File file  = new File("Path to file");
File[] files = file.listFiles();
Source

Also in Java: