durablefs

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureDirectoryTree

func EnsureDirectoryTree(path string, mode os.FileMode, syncDirectory func(string) error) error

EnsureDirectoryTree creates one component at a time beneath a guarded existing parent. The existing parent becomes the trusted root and remains guarded while each missing descendant is created, so directory setup cannot be redirected outside that boundary.

func SecurePublicationSupported

func SecurePublicationSupported() bool

SecurePublicationSupported reports whether this build has a handle-based implementation that can keep path topology stable during publication.

func SyncDirectory

func SyncDirectory(path string) error

SyncDirectory persists directory-entry changes after an atomic publish.

Types

type DirectoryGuard

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

DirectoryGuard resolves child operations through an open directory file descriptor, so later ancestor renames or symlink swaps cannot redirect them.

func GuardDirectoryTree

func GuardDirectoryTree(root, directory string) (*DirectoryGuard, error)

func (*DirectoryGuard) Close

func (guard *DirectoryGuard) Close() error

func (*DirectoryGuard) Path

func (guard *DirectoryGuard) Path(name string) string

func (*DirectoryGuard) ResolvePath

func (guard *DirectoryGuard) ResolvePath(name string) (string, error)

func (*DirectoryGuard) Sync

func (guard *DirectoryGuard) Sync() error

func (*DirectoryGuard) VerifyPath

func (guard *DirectoryGuard) VerifyPath(directory string) error

Jump to

Keyboard shortcuts

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