func (fs *Filesystem) Mkdir(name string, perm os.FileMode) error {
	fs.Lock()
	defer fs.Unlock()
	_, err := fs.root.lookupFile(name, name)
	if err == nil {
		return &os.PathError{
			Op:   "mkdir",
			Path: name,
			Err:  errors.New("File exists"),  
		}
	}
	dirName := path.Dir(name)
	fParent, errParent := fs.root.lookupFile(dirName, dirName)
	if errParent != nil {
		return &os.PathError{
			Op:   "mkdir",
			Path: name,
			Err:  errParent.(*os.PathError).Err,
		}
	}
	NewFile(fs, fParent, path.Base(name), perm, time.Now(), true)
	return nil
}
Mkdir creates a new directory with the specified name and permission bits
package fake
import (
	"errors"
	"os"
	"path"
	"strings"
	"sync"
	"time"
	"github.com/lemonldap-ng-controller/lemonldap-ng-controller/internal/filesystem"
)
type Filesystem struct {
	sync.RWMutex  
	root *File
}
func NewFilesystem() *Filesystem {
	fs := &Filesystem{}
	fs.root = NewFile(fs, nil, "/", 0755, time.Now(), true)
	fs.Mkdir("/var", 0755)
	fs.Mkdir("/var/lib", 0755)
	fs.Mkdir("/var/lib/lemonldap-ng", 0755)
	fs.Mkdir("/var/lib/lemonldap-ng/conf", 0755)
	content := []byte(`{
		"applicationList": {},
		"cfgNum": 1,
		"exportedHeaders": {},
		"locationRules": {},
		"reloadUrls": {
			"reload.example.com" : "http://reload.example.com/reload"
		}
	}`)
	fs.WriteFile("/var/lib/lemonldap-ng/conf/lmConf-1.js", content, 0644)
	return fs
}