data SandboxedPath :: RelOrAbs -> DirOrFile -> Typedata SandboxedPath a b

The type for paths that have been sandboxed.



sandbox :: forall a b. IsRelOrAbs a => Path Abs Dir -> Path a b -> Maybe (SandboxedPath a b)

Attempts to sandbox a path relative to an absolute directory ("sandbox root"). If the Path a b escapes the sandbox root Nothing will be returned.


sandboxAny :: forall a b. Path a b -> SandboxedPath a b

Sandboxes any path to /.

This should only be used for situations where a path is already constrained within a system so that access to / is safe - for instance, in URIs.


sandboxRoot :: forall a b. SandboxedPath a b -> Path Abs Dir

Returns the location a SandboxedPath was sandboxed to.


unsandbox :: forall a b. SandboxedPath a b -> Path a b

Extracts the original path from a SandboxedPath.