Java tutorial
//package com.java2s; import java.io.File; import java.util.ArrayList; import java.util.List; public class Main { public static List<String> getFolderContent(String folderDir) { File file = new File(folderDir); List<String> filesPath = new ArrayList<>(); if (!file.exists()) { } else { for (File f : file.listFiles()) { if (f.isFile()) { filesPath.add(f.getPath()); } } } return filesPath; } }