I want to get a list of files in a directory, but I want to sort it such that the oldest files are first. My solution was to call File.listFiles and just resort the list ba
public String[] getDirectoryList(String path) { String[] dirListing = null; File dir = new File(path); dirListing = dir.list(); Arrays.sort(dirListing, 0, dirListing.length); return dirListing; }