Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFailedToReadDirectory = errors.New("failed to read directory")
Functions ¶
func ClearFolder ¶
func ClearFolder(t *testing.T, cfg RunTime, fs FileSystem) error
clearFolder removes all subfolders within the specified directory, excluding a specific subfolder. It takes a FolderConfig struct as input containing the paths to relevant directories.
func RestoreVarsFile ¶
func RestoreVarsFile(t *testing.T, cfg RunTime, fs FileSystem) error
RestoreVarsFile restores the original content.
func UpdateVarsFile ¶
Types ¶
type FileSystem ¶
type FileSystem interface {
ReadDir(dirname string) ([]os.DirEntry, error)
RemoveAll(path string) error
ReadFile(path string) ([]byte, error)
WriteFile(filename string, data []byte, perm fs.FileMode) error
}
FileSystem interface abstracts file system operations.
type FolderPaths ¶
type OsFileSystem ¶
type OsFileSystem struct{}
OsFileSystem is a real implementation of FileSystem.
func (OsFileSystem) RemoveAll ¶
func (OsFileSystem) RemoveAll(path string) error
Click to show internal directories.
Click to hide internal directories.