func (fs *Share) RemoveAll(path string) error {
	err := fs.Remove(path)
	if err == nil || os.IsNotExist(err) {
		return nil
	}
	dir, serr := fs.Lstat(path)
	if serr != nil {
		if serr, ok := serr.(*os.PathError); ok && (os.IsNotExist(serr.Err) || serr.Err == syscall.ENOTDIR) {
			return nil
		}
		return serr
	}
	if !dir.IsDir() {
		return err
	}
	fd, err := fs.Open(path)
	if err != nil {
		if os.IsNotExist(err) {
			return nil
		}
		return err
	}
	err = nil
	for {
		names, err1 := fd.Readdirnames(100)
		for _, name := range names {
			err1 := fs.RemoveAll(path + string(PathSeparator) + name)
			if err == nil {
				err = err1
			}
		}
		if err1 == io.EOF {
			break
		}
		if err == nil {
			err = err1
		}
		if len(names) == 0 {
			break
		}
	}
	fd.Close()
	err1 := fs.Remove(path)
	if err1 == nil || os.IsNotExist(err1) {
		return nil
	}
	if err == nil {
		err = err1
	}
	return err
}
RemoveAll removes path and any children it contains.
It removes everything it can but returns the first error
it encounters. If the path does not exist, RemoveAll
returns nil (no error).
package smb2
import (
	"io"
	"os"
	"syscall"
)
func (fs *Share) MkdirAll(path string, perm os.FileMode) error {
	dir, err := fs.Stat(path)
	if err == nil {
		if dir.IsDir() {
			return nil
		}
		return &os.PathError{Op: "mkdir", Path: path, Err: syscall.ENOTDIR}
	}
	i := len(path)
	for i > 0 && IsPathSeparator(path[i-1]) {  
		i--
	}
	j := i
	for j > 0 && !IsPathSeparator(path[j-1]) {  
		j--
	}
	if j > 1 {
		err = fs.MkdirAll(path[0:j-1], perm)
		if err != nil {
			return err
		}
	}
	err = fs.Mkdir(path, perm)
	if err != nil {
		dir, err1 := fs.Lstat(path)
		if err1 == nil && dir.IsDir() {
			return nil
		}
		return err
	}
	return nil
}