rm

package
v0.0.0-...-70e5762 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2018 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoPreserveRoot = 1 << iota
	Force
	Recursive
	RemoveEmpty
	IgnoreMissing
	OneFileSystem
	Verbose
	PromptAlways
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PromptOption

type PromptOption uint8
const (
	// WriteProtected signals that the object to be removed or descended upon
	// has write protection.
	WriteProtected PromptOption = 1 << iota
	// Directory indicates the action is on a directory.
	Directory
	// Descend indicates the action is to descend into an object.
	Descend
	// Remove indicates the action is to remove an object.
	Remove
)

type RemoveOption

type RemoveOption uint8

type Remover

type Remover struct {

	// Prompt, if non-nil, will be called depending on the Remover's configured
	// options. If it returns true, the action continues, otherwise it stops.
	Prompt func(name string, opts PromptOption) bool

	Log chan string
	// contains filtered or unexported fields
}

func NewRemover

func NewRemover(opts RemoveOption) *Remover

func (*Remover) Remove

func (r *Remover) Remove(path string) (err error)

Directories

Path Synopsis
internal
sys

Jump to

Keyboard shortcuts

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