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

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

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