Is there a way to sort files in a directory using FileUtils Apache? I wan't to sort the files by the date they are created...
I have tried the following code:
public String[] getPDFFiles (String dir) throws IOException {
File myDir = new File(dir);
Collection<File> files = FileUtils.listFiles(myDir,
new String[] {"pdf", "PDF"}, true);
That's all you nedd :)