helper

package
v0.0.0-...-43eb642 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateWriter

func CreateWriter(fs afero.Fs, file *model.File) (writer *bufio.Writer, err error)

CreateWriter creates a *bufio writer from a given file info pointer, opening the file with WRONLY permissions, ready for writing to

func GetAllFiles

func GetAllFiles(fs afero.Fs, paths []string) (files model.Files, err error)

GetAllFiles gets a slice of info pointers to every file in the collection of paths given, recursing down into them if they are directories

func GetTopLevelDirectories

func GetTopLevelDirectories(fs afero.Fs, paths []string) (directories model.Files, err error)

GetTopLevelDirectories gets a slice of info points to every directory in the collection of paths given

func Overwrite

func Overwrite(fs afero.Fs, file *model.File) (err error)

Overwrite writes random data into a target file such that any magnetic shadow left by a file is corrupted and harder to retreive

func Pipe

func Pipe(reader io.Reader, writer *bufio.Writer) (err error)

Pipe copies the data from an io reader into a *bufio writer, flusing when done

func ProcessFile

func ProcessFile(fs afero.Fs, opts *model.Options, file *model.File) (err error)

ProcessFile overwrites a given file with random data a given number of times

Types

This section is empty.

Jump to

Keyboard shortcuts

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