coreutils

package module
v0.0.0-...-8cc7a59 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2013 License: GPL-3.0 Imports: 6 Imported by: 0

README

coreutils

GNU Coreutils written in Go

Licensed as GPLv3 or later.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BackupSuffix = "~"
	Mode         = os.FileMode(uint32(0755))
	Noderef      = true
	Preserveroot = false
	Prompt       = false
	Silent       = false
	Target       = ""
)
View Source
var License = `` /* 197-byte string literal not displayed */
View Source
var PromptFunc = func(filename string, ignored bool) bool {
	prompt := "Overwrite " + filename + "?"
	var response string
	trueresponse := "yes"
	falseresponse := "no"
	for {
		fmt.Print(prompt)
		fmt.Scanln(&response)
		response = strings.ToLower(response)
		if strings.Contains(trueresponse, response) {
			return true
		}
		if strings.Contains(falseresponse, response) || response == "" {
			return false
		}
	}
}

Functions

func Backup

func Backup(dest string)

func ParseMode

func ParseMode(m string) error

func PrintUsage

func PrintUsage()

func Recurse

func Recurse(fileptr *[]string) (exit bool)

func SetBackupSuffix

func SetBackupSuffix(suffix string) error

func SetTarget

func SetTarget(t string) error

func Stat

func Stat(file string) (os.FileInfo, error)

func Version

func Version() error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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