assfs

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package assfs contains filesystem assert functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssertFs

type AssertFs struct {
	// contains filtered or unexported fields
}

AssertFs contains filesystem operations with asserts.

func NewAssertFs

func NewAssertFs(req *require.Assertions, fs *afero.Afero) *AssertFs

NewAssertFs is a ctor for AssertFs.

func (*AssertFs) Contains

func (v *AssertFs) Contains(filep, content, message string)

Contains checks if the file contains content.

func (*AssertFs) DirExists

func (v *AssertFs) DirExists(dirp, message string)

DirExists asserts that dirp exists.

func (*AssertFs) Exists

func (v *AssertFs) Exists(path, message string)

Exists asserts that path exists.

func (*AssertFs) MkdirAll

func (v *AssertFs) MkdirAll(dirp, message string)

MkdirAll creates the dirp.

func (*AssertFs) NotExists

func (v *AssertFs) NotExists(path, message string)

NotExists assert that path doesn't exist.

func (*AssertFs) ReadLines

func (v *AssertFs) ReadLines(filep, message string) []string

ReadLines reads lines of file.

func (*AssertFs) WriteBytes

func (v *AssertFs) WriteBytes(filep string, b []byte) error

WriteBytes writes bytes to filep.

func (*AssertFs) WriteLargeTextFile

func (v *AssertFs) WriteLargeTextFile(filep, content, message string)

WriteLargeTextFile creates directories and writes the content plus a megabyte.

func (*AssertFs) WriteTextFile

func (v *AssertFs) WriteTextFile(filep, content, message string)

WriteTextFile writes a text file and creates the directories.

Jump to

Keyboard shortcuts

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