localfs

package
v0.0.0-...-b0fafec Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dir

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

Dir is an open directory on the local file system.

func OpenDir

func OpenDir(ref lbdeploy.DirRef) (Dir, error)

OpenDir attempts to open the directory identified by the given directory reference.

func (Dir) Close

func (d Dir) Close() error

Close releases any resources or system handles held by the directory.

func (Dir) Path

func (d Dir) Path() string

Path returns the path to the directory on the local system.

func (Dir) System

func (d Dir) System() *os.Root

System returns the underlying os.Root for the directory.

type File

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

File is an open file on the local file system.

func OpenFile

func OpenFile(ref lbdeploy.FileRef) (File, error)

OpenFile attempts to open the file identified by the given file reference.

func (File) Close

func (f File) Close() error

Close releases any resources or system handles held by the file.

func (File) Path

func (f File) Path() string

Path returns the path to the file on the local system.

func (File) System

func (f File) System() *os.File

System returns the underlying os.File for the file.

type Resolver

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

Resolver is capable of locating file system resources on the local system.

func NewResolver

func NewResolver(resources lbdeploy.FileSystemResources) Resolver

NewResolver returns a new resolver for the given file system resources.

func (*Resolver) ResolveDirectory

func (resolver *Resolver) ResolveDirectory(id lbdeploy.DirectoryResourceID) (ref lbdeploy.DirRef, err error)

ResolveDirectory resolves the requested directory resource, returning a directory reference that can be mapped to a path on the local system.

Successfully resolving a directory resource means that its path on the local system can be determined, but it does not imply that the directory exists.

If the directory cannot be resolved, an error is returned.

func (*Resolver) ResolveFile

func (resolver *Resolver) ResolveFile(id lbdeploy.FileResourceID) (ref lbdeploy.FileRef, err error)

ResolveFile resolves the requested file resource, returning a file reference that can be mapped to a path on the local system.

Successfully resolving a file resource means that its path on the local system can be determined, but it does not imply that the file exists.

If the file cannot be resolved, an error is returned.

func (*Resolver) ResolveKnownFolder

func (resolver *Resolver) ResolveKnownFolder(id lbdeploy.DirectoryResourceID) (lbdeploy.KnownFolder, error)

ResolveKnownFolder looks for a known folder with the given directory resource ID. If a known folder with the given ID is not recognized, it returns fs.ErrNotExist.

Jump to

Keyboard shortcuts

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