# File lib/foxtails/FTFileBrowser.rb, line 306
    def on_cmd_new_dir
      # adapted from FXFileSelector::onCmdNew
      dir = directory
      name = FXInputDialog.getString(
              "DirectoryName", self, "Create New Directory",
              "Create new directory in: #{dir}", NEW_DIR_ICON)
      if name
        dirname = File.join(dir, name)
        begin
          Dir.mkdir(dirname)
        rescue Errno::EACCES
          FXMessageBox.error(self, MBOX_OK, "Cannot Create",
            "Cannot create directory #{dirname}.\n")
        rescue Errno::EEXIST
          FXMessageBox.error(self, MBOX_OK, "Already Exists",
            "Directory #{dirname} already exists.\n")
        end
      end
    end