filesystem

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanDir

func CleanDir(dir string) string

func DirFiles

func DirFiles(fs FS, dir string) (primary []string, err error)

func GetTerraformFileNameList

func GetTerraformFileNameList(dirname string) ([]string, error)

func GetTerragruntModuleNameList

func GetTerragruntModuleNameList(dirname string) (*[]string, error)

func PrintPWD

func PrintPWD()

Types

type FS

type FS interface {
	Open(name string) (File, error)
	RemoveDir(name string) error
	RemoveFile(name string) error
	ReadFile(name string) ([]byte, error)
	ReadDir(dirname string) ([]os.FileInfo, error)
	MakeDirs(name string)
	ListDirs(string) ([]string, error)
	Exists(name string) (bool, error)
}

FS represents a minimal filesystem implementation See io/fs.FS in http://golang.org/s/draft-iofs-design

func NewOsFs

func NewOsFs() FS

type File

type File interface {
	Stat() (os.FileInfo, error)
	Read([]byte) (int, error)
	Close() error
}

File represents an open file in FS See io/fs.File in http://golang.org/s/draft-iofs-design

type TempFile

type TempFile struct {
	Name string
}

func (*TempFile) Path

func (f *TempFile) Path() string

func (*TempFile) Remove

func (f *TempFile) Remove()

Jump to

Keyboard shortcuts

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