package markers

import (
	"os"
	"path/filepath"
)

const (
	baseDir = "/opt/zlh/.zlh"
)

func IsPresent(name string) bool {
	_, err := os.Stat(filepath.Join(baseDir, name))
	return err == nil
}

func Write(name string) error {
	if err := os.MkdirAll(baseDir, 0755); err != nil {
		return err
	}
	return os.WriteFile(filepath.Join(baseDir, name), []byte("ok"), 0644)
}
