feat: add working watchdog cycle

This commit is contained in:
DaanSelen
2026-04-22 11:51:57 +02:00
parent bf04e97850
commit 0c287cc917
10 changed files with 166 additions and 82 deletions
+32
View File
@@ -0,0 +1,32 @@
package utility
import (
"os"
"path/filepath"
)
// part of filesystem checking
func EnsureOperation(workDir string) error {
nDirs := []string{
workDir,
filepath.Join(workDir),
filepath.Join(workDir, "content"),
}
for _, p := range nDirs {
if err := os.MkdirAll(p, 0755); err != nil {
return err
}
}
return nil
}
func RemoveFile(p string) error {
err := os.Remove(p)
if err != nil {
return err
}
return nil
}