genericfstree

package
v0.0.0-...-9a2cfe9 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: Apache-2.0, MIT Imports: 2 Imported by: 0

Documentation

Overview

Package genericfstree provides tools for implementing vfs.FilesystemImpls where a single statically-determined lock or set of locks is sufficient to ensure that a Dentry's name and parent are contextually immutable.

Clients using this package must use the go_template_instance rule in tools/go_generics/defs.bzl to create an instantiation of this template package, providing types to use in place of Dentry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugPathname

func DebugPathname(d *Dentry) string

DebugPathname returns a pathname to d relative to its filesystem root. DebugPathname does not correspond to any Linux function; it's used to generate dentry pathnames for debugging.

func IsAncestorDentry

func IsAncestorDentry(d, d2 *Dentry) bool

IsAncestorDentry returns true if d is an ancestor of d2; that is, d is either d2's parent or an ancestor of d2's parent.

func PrependPath

func PrependPath(vfsroot vfs.VirtualDentry, mnt *vfs.Mount, d *Dentry, b *fspath.Builder) error

PrependPath is a generic implementation of FilesystemImpl.PrependPath().

Types

type Dentry

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

Dentry is a required type parameter that is a struct with the given fields.

+stateify savable

func ParentOrSelf

func ParentOrSelf(d *Dentry) *Dentry

ParentOrSelf returns d.parent. If d.parent is nil, ParentOrSelf returns d.

Jump to

Keyboard shortcuts

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