Sorts the files list using the chosen category.
Reverses the order of the files list depending on the chosen sort method.