aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/path.go
diff options
context:
space:
mode:
Diffstat (limited to 'container/path.go')
-rw-r--r--container/path.go34
1 files changed, 34 insertions, 0 deletions
diff --git a/container/path.go b/container/path.go
index 28a56a13..fe6d6d4c 100644
--- a/container/path.go
+++ b/container/path.go
@@ -13,6 +13,8 @@ import (
"hakurei.app/container/vfs"
)
+/* constants in this file bypass abs check, be extremely careful when changing them! */
+
const (
// FHSRoot points to the file system root.
FHSRoot = "/"
@@ -49,6 +51,38 @@ const (
FHSSys = "/sys/"
)
+var (
+ // AbsFHSRoot is [FHSRoot] as [Absolute].
+ AbsFHSRoot = &Absolute{FHSRoot}
+ // AbsFHSEtc is [FHSEtc] as [Absolute].
+ AbsFHSEtc = &Absolute{FHSEtc}
+ // AbsFHSTmp is [FHSTmp] as [Absolute].
+ AbsFHSTmp = &Absolute{FHSTmp}
+
+ // AbsFHSRun is [FHSRun] as [Absolute].
+ AbsFHSRun = &Absolute{FHSRun}
+ // AbsFHSRunUser is [FHSRunUser] as [Absolute].
+ AbsFHSRunUser = &Absolute{FHSRunUser}
+
+ // AbsFHSUsrBin is [FHSUsrBin] as [Absolute].
+ AbsFHSUsrBin = &Absolute{FHSUsrBin}
+
+ // AbsFHSVar is [FHSVar] as [Absolute].
+ AbsFHSVar = &Absolute{FHSVar}
+ // AbsFHSVarLib is [FHSVarLib] as [Absolute].
+ AbsFHSVarLib = &Absolute{FHSVarLib}
+
+ // AbsFHSDev is [FHSDev] as [Absolute].
+ AbsFHSDev = &Absolute{FHSDev}
+ // AbsFHSProc is [FHSProc] as [Absolute].
+ AbsFHSProc = &Absolute{FHSProc}
+ // AbsFHSSys is [FHSSys] as [Absolute].
+ AbsFHSSys = &Absolute{FHSSys}
+
+ // AbsNonexistent is [Nonexistent] as [Absolute].
+ AbsNonexistent = &Absolute{Nonexistent}
+)
+
const (
// Nonexistent is a path that cannot exist.
// /proc is chosen because a system with covered /proc is unsupported by this package.