...

Package fs

import "github.com/prometheus/procfs/internal/fs"
Overview
Index

Overview ▾

Constants

const (
    // DefaultProcMountPoint is the common mount point of the proc filesystem.
    DefaultProcMountPoint = "/proc"

    // DefaultSysMountPoint is the common mount point of the sys filesystem.
    DefaultSysMountPoint = "/sys"

    // DefaultConfigfsMountPoint is the common mount point of the configfs.
    DefaultConfigfsMountPoint = "/sys/kernel/config"
)

type FS

FS represents a pseudo-filesystem, normally /proc or /sys, which provides an interface to kernel data structures.

type FS string

func NewFS

func NewFS(mountPoint string) (FS, error)

NewFS returns a new FS mounted under the given mountPoint. It will error if the mount point can't be read.

func (FS) Path

func (fs FS) Path(p ...string) string

Path appends the given path elements to the filesystem path, adding separators as necessary.