public static String[] getFilePaths(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);
	    
	    String[] paths = new String[files.length];
	    
	    for(int i = 0; i < files.length;i++)
	    {
		try 
		{
		    paths[i] = files[i].getCanonicalPath();
		}
		catch(IOException e){}
	    }
	    
	    return paths;
	}
	else
	    return null; // Directory is empty.
    }