public static String[] getFiles(String category) throws Exception {
		List<String> filelist = new ArrayList<String>();
		database = new DataBase();
		boolean iscategory = false, allcategories = false;
		if (category.equals("Categories"))
			allcategories = true;
		for (int i = 0; i < categories.length; i++) {
			if (category.equals(categories[i]))
				iscategory = true;
			for (int j = 0; !subcategories[i][j].equals("."); j++)
				if (category.equals(subcategories[i][j]) || iscategory
						|| allcategories)
					for (int k = 0; !extensions[i][j][k].equals("."); k++)
						filelist.addAll(database.retrieve(extensions[i][j][k]));
			if (iscategory)
				break;
		}
		database.closeConnection();
		String[] files = filelist.toArray(new String[filelist.size()]);
		return files;
	}