public static File[] getFiles(String path)
    {
	if(!isDirEmpty(path))
	{
	    File dir = new File(path);
	    File[] files = dir.listFiles();

	    // This filter only returns the files present
	    FileFilter fileFilter = new FileFilter() {
		public boolean accept(File file) {
		    return file.isFile();
		}
	    };

	    files = dir.listFiles(fileFilter);
	    Arrays.sort(files);
	    return files;
	}
	else
	    return null; // Directory is empty.
    }