Protect Directories

Is there a stack or plug-in that allows you to protect your site’s public directories?

I only want the user to access the linked file. I do not want them to be able to get to the directory tree by truncating the URL.

You can do this yourself for free with .htaccess files that can be created with any text editor.