Let's say we want to create/rename/delete directories apart from the root directory,
/, which should of course never be renamed or deleted.
Keeping with the compact theme, this example involves adding a select box with a list of actions that can be performed on the selected directory.
In the HTML, all that should be changed is the
<option> element — we defined
/dir1/ as being selected in the last example, but as we are adding the ability to delete directories, it's best to set the value in this example to a directory that cannot be deleted. In your own production code, you should make sure the selected directory exists before printing it out to the select box. In this example, it's plain HTML, so there ...