Sorting, expanding, and collapsing the file explorer with commands / hotkeys?

I’d like a way to sort the file explorer with commands, either a command for each sorting option: A to Z, modified and created times, and each reversed (which I could search with the command palette). That or a command to choose from a menu of sorting options: a command palette like menu where I can narrow down the option by typing it in).

Also, two commands for expanding and collapsing all the files in file explorer.