localfs

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package localfs rejects known network, userspace, and unknown filesystem classes before Hecate performs sensitive in-process reads. This bounds repository-selected remote/FUSE exposure; it cannot make a failing physical local device synchronously cancellable.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnboundedFilesystem = errors.New("path is not on a bounded local filesystem")

Functions

func EnsureBoundedFile

func EnsureBoundedFile(file *os.File) error

func EnsureBoundedPath

func EnsureBoundedPath(path string) error

func EnsureBoundedTree

func EnsureBoundedTree(path string) error

func PathWithinDirectory

func PathWithinDirectory(root, candidate string) bool

PathWithinDirectory reports whether candidate is root or one of its descendants using the host platform's ordinary filepath semantics.

Types

type Inspector

type Inspector struct {
	// contains filtered or unexported fields
}

func NewInspector

func NewInspector() (*Inspector, error)

func (*Inspector) EnsurePath

func (inspector *Inspector) EnsurePath(path string) error

func (*Inspector) EnsureTree

func (inspector *Inspector) EnsureTree(path string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL