func cmdMkDir(tt *TreeTerm, arg ...string) (string, error) {
	var res string
	lenArg := len(arg)
	err := fmt.Errorf("mkdir requires a directory path")
	if lenArg > 0 {
		p := tt.parsePathParam(arg[0])
		dir, newdir := path.Split(p)
		if newdir == "" {
			dir, newdir = path.Split(dir[:len(dir)-1])
		}
		_, err = tt.tree.ItemOp(dir, map[string]string{
			rufs.ItemOpAction: rufs.ItemOpActMkDir,
			rufs.ItemOpName:   newdir,
		})
	}
	return res, err
}
/*
cmdMkDir Create a new direectory.
package term
import (
	"fmt"
	"os"
	"path"
	"path/filepath"
	"devt.de/krotik/common/bitutil"
	"devt.de/krotik/rufs"
)
func cmdCat(tt *TreeTerm, arg ...string) (string, error) {
	err := fmt.Errorf("cat requires a file path")
	if len(arg) > 0 {
		err = tt.tree.ReadFileToBuffer(tt.parsePathParam(arg[0]), tt.out)
	}
	return "", err
}
func cmdGet(tt *TreeTerm, arg ...string) (string, error) {
	var res string
	lenArg := len(arg)
	err := fmt.Errorf("get requires at least a source file path")
	if lenArg > 0 {
		var f *os.File
		src := tt.parsePathParam(arg[0])
		dst := src
		if lenArg > 1 {
			dst = tt.parsePathParam(arg[1])
		}
		_, dst = filepath.Split(dst)
		if f, err = os.OpenFile(dst, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0660); err == nil {
			defer f.Close()
			if err = tt.tree.ReadFileToBuffer(src, f); err == nil {
				res = fmt.Sprintf("Written file %s", dst)
			}
		}
	}
	return res, err
}
func cmdPut(tt *TreeTerm, arg ...string) (string, error) {
	var res string
	lenArg := len(arg)
	err := fmt.Errorf("put requires a source and destination file path")
	if lenArg > 0 {
		var f *os.File
		src := arg[0]
		dst := tt.parsePathParam(arg[1])
		if f, err = os.Open(src); err == nil {
			defer f.Close()
			if err = tt.tree.WriteFileFromBuffer(dst, f); err == nil {
				res = fmt.Sprintf("Written file %s", dst)
			}
		}
	}
	return res, err
}
func cmdRm(tt *TreeTerm, arg ...string) (string, error) {
	var res string
	lenArg := len(arg)
	err := fmt.Errorf("rm requires a file path")
	if lenArg > 0 {
		p := tt.parsePathParam(arg[0])
		dir, file := path.Split(p)
		if file == "" {
			dir, file = path.Split(dir[:len(dir)-1])
		}
		_, err = tt.tree.ItemOp(dir, map[string]string{
			rufs.ItemOpAction: rufs.ItemOpActDelete,
			rufs.ItemOpName:   file,
		})
	}
	return res, err
}
func cmdRen(tt *TreeTerm, arg ...string) (string, error) {
	var res string
	lenArg := len(arg)
	err := fmt.Errorf("ren requires a filename and a new filename")
	if lenArg > 1 {
		p := tt.parsePathParam(arg[0])
		p2 := tt.parsePathParam(arg[1])
		dir1, file1 := path.Split(p)
		dir2, file2 := path.Split(p2)
		if file2 == "" || dir2 != "/" {
			err = fmt.Errorf("new filename must not have a path")
		} else {
			if file1 == "" {
				dir1, file1 = path.Split(dir1[:len(dir1)-1])
			}
			_, err = tt.tree.ItemOp(dir1, map[string]string{
				rufs.ItemOpAction:  rufs.ItemOpActRename,
				rufs.ItemOpName:    file1,
				rufs.ItemOpNewName: file2,
			})
		}
	}
	return res, err
}