osshim

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Os

type Os interface {
	ReadFile(name string) ([]byte, error)
	IsNotExist(err error) bool
	IsDir(path string) (bool, error)
}

Os is shim for methods from os package

type OsShim

type OsShim struct{}

OsShim is default Os implementation

func (*OsShim) IsDir added in v0.45.0

func (sh *OsShim) IsDir(path string) (bool, error)

IsDir checks if a given path is a dir

func (*OsShim) IsNotExist

func (sh *OsShim) IsNotExist(err error) bool

IsNotExist see os.IsNotExist

func (*OsShim) ReadFile

func (sh *OsShim) ReadFile(name string) ([]byte, error)

ReadFile see os.ReadFile

Directories

Path Synopsis
SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and Gardener contributors
SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and Gardener contributors

Jump to

Keyboard shortcuts

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