file

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Overview

Package file provides bounded reads for resolved debugfs pseudo-files.

Most callers should obtain File values from debugfs.FS rather than calling New directly. debugfs.FS resolves paths under a configured debugfs mount point; this package only knows how to read the file once a path has been resolved.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPath = errors.New("invalid debugfs file path")

ErrInvalidPath reports a file with no resolved path.

Functions

This section is empty.

Types

type File

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

File is a resolved debugfs file.

func New

func New(path string) File

New returns a File for path.

func (File) Path

func (f File) Path() string

Path returns the resolved absolute path for f.

func (File) ReadAll

func (f File) ReadAll() ([]byte, error)

ReadAll reads f with a bounded read suitable for small pseudo-files.

Jump to

Keyboard shortcuts

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