file

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package file virtualizes file systems for mock testing.

Index

Constants

View Source
const LinuxRoot string = "/"

LinuxRoot is the root in Linux.

Variables

View Source
var FS = os.DirFS(LinuxRoot) //nolint:gochecknoglobals

FS represents the file system in use. By default, it points to the actual file system, and can be modified to a virtual file system for testing.

Functions

func ReadString

func ReadString(ppfmt pp.PP, path string) (string, bool)

ReadString reads the content of the file at path. It treats an absolute path as a path relative to the root of FS.

Types

This section is empty.

Jump to

Keyboard shortcuts

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