Documentation ¶
Overview ¶
Package shred is a golang library to mimic the functionality of the linux shred command
Example ¶
package main import ( "github.com/lu4p/shred" ) func main() { shredconf := shred.Conf{Times: 1, Zeros: true, Remove: false} shredconf.Path("/path/to/dir_or_file") }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conf ¶
Conf is a object containing all choices of the user
func (Conf) Dir ¶
Dir overwrites every File in the location of path and everything in its subdirectories
Example ¶
package main import ( "github.com/lu4p/shred" ) func main() { shredconf := shred.Conf{Times: 1, Zeros: true, Remove: false} shredconf.Dir("/path/to/dir") }
Output:
func (Conf) File ¶
File overwrites a given File in the location of path
Example ¶
package main import ( "github.com/lu4p/shred" ) func main() { shredconf := shred.Conf{Times: 1, Zeros: true, Remove: false} shredconf.File("/path/to/file") }
Output:
func (Conf) Path ¶
Path shreds all files in the location of path recursively. If remove is set to true files will be deleted after shredding. When a file is shredded its content is NOT recoverable so USE WITH CAUTION!!!
Example ¶
package main import ( "github.com/lu4p/shred" ) func main() { shredconf := shred.Conf{Times: 1, Zeros: true, Remove: false} shredconf.Path("/path/to/dir_or_file") }
Output:
Click to show internal directories.
Click to hide internal directories.