os

package
v1.397.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 6 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Options(
	fx.Provide(NewFS),
)

Module for fx.

Functions

func ExecutableName

func ExecutableName() string

ExecutableName of the running application.

func IsNotExist added in v1.386.0

func IsNotExist(err error) bool

IsNotExist if the error is os.ErrNotExist.

func PathExists added in v1.386.0

func PathExists(path string) bool

PathExists for the path provided.

func ReadBase64File added in v1.193.0

func ReadBase64File(path string) (string, error)

ReadBase64File for the path provided.

func ReadFile added in v1.195.0

func ReadFile(path string) (string, error)

ReadFile for the path provided.

Types

type FileSystem added in v1.375.0

type FileSystem interface {
	// ReadFile for the path provided.
	ReadFile(path string) (string, error)

	// PathExists for the path provided.
	PathExists(path string) bool

	// IsNotExist whether the error is os.ErrNotExist.
	IsNotExist(err error) bool
}

FileSystem borrows concepts from io/fs.

func NewFS added in v1.375.0

func NewFS() FileSystem

NewFS for os.

Jump to

Keyboard shortcuts

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