trackingvfs

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package trackingvfs provides a VFS wrapper that records every file path accessed during compilation. This allows watch mode to know exactly which files and directories the compiler depended on, including non-existent paths from failed module resolution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS struct {
	Inner     vfs.FS
	SeenFiles collections.SyncSet[string]
}

FS wraps a vfs.FS and records every path accessed via read-like operations. Write operations (WriteFile, Remove, Chtimes) are not tracked since they represent outputs, not dependencies.

func (*FS) AppendFile

func (fs *FS) AppendFile(path string, data string) error

func (*FS) Chtimes

func (fs *FS) Chtimes(path string, aTime time.Time, mTime time.Time) error

func (*FS) DirectoryExists

func (fs *FS) DirectoryExists(path string) bool

func (*FS) FileExists

func (fs *FS) FileExists(path string) bool

func (*FS) GetAccessibleEntries

func (fs *FS) GetAccessibleEntries(path string) vfs.Entries

func (*FS) ReadFile

func (fs *FS) ReadFile(path string) (string, bool)

func (*FS) Realpath

func (fs *FS) Realpath(path string) string

func (*FS) Remove

func (fs *FS) Remove(path string) error

func (*FS) Stat

func (fs *FS) Stat(path string) vfs.FileInfo

func (*FS) UseCaseSensitiveFileNames

func (fs *FS) UseCaseSensitiveFileNames() bool

func (*FS) WalkDir

func (fs *FS) WalkDir(root string, walkFn vfs.WalkDirFunc) error

func (*FS) WriteFile

func (fs *FS) WriteFile(path string, data string) error

Jump to

Keyboard shortcuts

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