This will the hide the listing of files in a folder unless "admin is turned on", but will display the subfolders. The template can be easily modified to hide them as well.
For the reasoning behind this insanity, please see my wiki: http://www.webgui.org/wiki/building-your-own-file-system-within-webgui