io

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NopCloser

func NopCloser(w io.Writer) io.WriteCloser

func ReadFirstFile

func ReadFirstFile(directories []string, filename string) ([]byte, error)

ReadFirstFile looks for the file in all available paths if it fails to find it, it returns an error

Types

type OSFS

type OSFS struct{}

OSFS implements fs.FS using methods on os to read from the system. Note that this implementation is not a compliant fs.FS, as they should only accept posix-style, relative paths, but as this is an internal implementation detail, we get the abstraction we need while being able to handle paths as the os package otherwise would. More context in: https://github.com/golang/go/issues/44279

func (OSFS) Glob

func (OSFS) Glob(pattern string) ([]string, error)

func (OSFS) Open

func (OSFS) Open(name string) (fs.File, error)

func (OSFS) ReadDir

func (OSFS) ReadDir(name string) ([]fs.DirEntry, error)

func (OSFS) ReadFile

func (OSFS) ReadFile(name string) ([]byte, error)

Jump to

Keyboard shortcuts

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