shred

package
v2.0.0-beta5 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File interface {
	Seek(int64, int) (int64, error)
	Sync() error
	Write([]byte) (int, error)
	WriteAt([]byte, int64) (int, error)
	Close() error
}

type FileInfo

type FileInfo interface {
	Name() string       // base name of the file
	Size() int64        // length in bytes for regular files; system-dependent for others
	Mode() fs.FileMode  // file mode bits
	ModTime() time.Time // modification time
	IsDir() bool        // abbreviation for Mode().IsDir()
	Sys() any           // underlying data source (can return nil)
}

A FileInfo describes a file and is returned by Stat.

type ProgressBar

type ProgressBar interface {
	Add(int) error
	Write([]byte) (int, error)
	Finish() error
}

type Shredder

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

func New

func New(opts *ShredderOptions) *Shredder

func (*Shredder) Write

func (s *Shredder) Write(pathName string) error

type ShredderOptions

type ShredderOptions struct {
	Zero       bool
	Iterations int
	Bar        ProgressBar
}

Jump to

Keyboard shortcuts

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