util

package
v0.0.0-...-02935c3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndMakeDir

func CheckAndMakeDir(dst string) error

CheckAndMakeDir checks if the destination directory exists. If there is no destination directory, it will create it.

func Copy

func Copy(src, dst string) error

Copy is a standard copy function for files and directories.

func CreateUniqueDir

func CreateUniqueDir(root string) (string, error)

CreateUniqueDir creates the unique name directory and return the directory path. The name is "{Hostname}_{Day-Time}" format.

func RegExport

func RegExport(regKey, root string) error

RegExport exports the windows registry key to the {regKey}.reg file.

func SaveEventLog

func SaveEventLog(dst string) error

SaveEventLog saves the windows event logs in both binary and text formats.

Types

type Archiver

type Archiver interface {
	DestFmt() func(string) string
	Archive(src, dest string) error
}

Archiver is an interface to compress files and directories to archive.

var ZIP Archiver = (*zipper)(nil)

ZIP is an Archiver to compress and decompress as zip file format

Jump to

Keyboard shortcuts

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