os

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 6 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 struct {
	// contains filtered or unexported fields
}

func New

func New(workDir string) *Os

func (*Os) FileExists

func (o *Os) FileExists(i any) (bool, error)

FileExists checks whether a file exists under the given path.

func (*Os) ReadDir

func (o *Os) ReadDir(i any) ([]os.FileInfo, error)

ReadDir lists the directory contents relative to the configured WorkingDir.

func (*Os) ReadFile

func (o *Os) ReadFile(i any) (string, error)

ReadFile reads the file named by filename relative to the configured WorkingDir. It returns the contents as a string. There is an upper size limit set at 1 megabytes.

func (*Os) Stat

func (o *Os) Stat(i any) (os.FileInfo, error)

Stat returns the os.FileInfo structure describing file.

Jump to

Keyboard shortcuts

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