searchfs

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package searchfs provides a filesystem implementation that caches the listing of every directory accessed. It aims to avoid unnecessary "stat" calls when looking for (or opening) many files in a tree. The filenames provided must be already cleaned (via filepath.Clean).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

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

func New

func New(base fs.FS) *FS

func (*FS) Open

func (sfs *FS) Open(name string) (fs.File, error)

func (*FS) ReadDir

func (sfs *FS) ReadDir(name string) ([]fs.DirEntry, error)

func (*FS) Stat

func (sfs *FS) Stat(name string) (fs.FileInfo, error)

Jump to

Keyboard shortcuts

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