testutil

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DIRSPERM = 0755
	FILEPERM = 0644
)

Variables

This section is empty.

Functions

func CleanUpRealTestFs

func CleanUpRealTestFs(testDir string)

func CreateFile

func CreateFile(testDir, fileDir, fileName, fileContent string)

func DirList

func DirList(fileSystem iofs.FS) string

func DirListTree

func DirListTree(fileSystem iofs.FS) string

func ListFs

func ListFs(fs afero.Fs, path string) string

func MakeEmptyRealTestFs

func MakeEmptyRealTestFs() string

func MakeEmptyTestFs

func MakeEmptyTestFs() afero.Fs

func MakeFs

func MakeFs(dirs, files []string) afero.Fs

func MakeRealFs

func MakeRealFs(dirs, files []string) string

func MakeRealTestFs

func MakeRealTestFs() string

func MakeTestFs

func MakeTestFs() afero.Fs

Types

type ManagedDir

type ManagedDir struct {
	FsOriginal afero.Fs
	FsSub      afero.Fs
	// contains filtered or unexported fields
}

func ManageDir

func ManageDir() ManagedDir

func (*ManagedDir) CleanUp

func (md *ManagedDir) CleanUp()

func (*ManagedDir) FillFile

func (md *ManagedDir) FillFile(path, name, content string)

func (*ManagedDir) ListTree

func (md *ManagedDir) ListTree() string

func (*ManagedDir) ListTreeOsfs

func (md *ManagedDir) ListTreeOsfs() string

* NOTE: essentially does the same as ListTree().

func (*ManagedDir) Path

func (md *ManagedDir) Path() string

func (*ManagedDir) SubPath

func (md *ManagedDir) SubPath(path string) string

Jump to

Keyboard shortcuts

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