aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/outcome/dispatcher.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-12-15 12:32:05 +0900
committerOphestra <cat@gensokyo.uk>2025-12-15 12:32:46 +0900
commitd0a3c6a2f3ac4da3921fa525cf1ee5ea7d68eb1c (patch)
tree057761396cc629e36ed1f58237f95dd41278e916 /internal/outcome/dispatcher.go
parent0c0e3d6fc2bf37eef703e9295fc56ef2a2fc5808 (diff)
internal/outcome: optional shim private dir
This is a private work directory owned by the specific shim. Useful for sockets owned by this instance of the shim and requires no direct assistance from the priv-side process. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/outcome/dispatcher.go')
-rw-r--r--internal/outcome/dispatcher.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/outcome/dispatcher.go b/internal/outcome/dispatcher.go
index a5339b20..0813f819 100644
--- a/internal/outcome/dispatcher.go
+++ b/internal/outcome/dispatcher.go
@@ -53,6 +53,10 @@ type syscallDispatcher interface {
readdir(name string) ([]os.DirEntry, error)
// tempdir provides [os.TempDir].
tempdir() string
+ // mkdir provides [os.Mkdir].
+ mkdir(name string, perm os.FileMode) error
+ // removeAll provides [os.RemoveAll].
+ removeAll(path string) error
// exit provides [os.Exit].
exit(code int)
@@ -121,6 +125,8 @@ func (direct) stat(name string) (os.FileInfo, error) { return os.Stat(name)
func (direct) open(name string) (osFile, error) { return os.Open(name) }
func (direct) readdir(name string) ([]os.DirEntry, error) { return os.ReadDir(name) }
func (direct) tempdir() string { return os.TempDir() }
+func (direct) mkdir(name string, perm os.FileMode) error { return os.Mkdir(name, perm) }
+func (direct) removeAll(path string) error { return os.RemoveAll(path) }
func (direct) exit(code int) { os.Exit(code) }
func (direct) evalSymlinks(path string) (string, error) { return filepath.EvalSymlinks(path) }