osutil

package module
v0.0.0-...-64bb05d Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2016 License: MIT Imports: 9 Imported by: 0

README

osutil GoDoc

The os package of the std packages of Go does not support some functionality which is then implemented over and over again in a lot of projects. One example is to copy a file. This looks simple at first but is very complicated if everything has to be done right (e.g. permissions, ACLs, attributes, ...). osutil handles the simple cases which can be done right. If you have any ideas on how to improve this package or have problems of any kind with it, please submit an issue through the issue tracker.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotADirectory = errors.New("not a directory")
)

Exist errors

Functions

func Capture

func Capture(call func()) ([]byte, error)

Capture captures stderr and stdout of a given function call.

func CaptureWithCGo

func CaptureWithCGo(call func()) ([]byte, error)

CaptureWithCGo captures stderr and stdout as well as stderr and stdout of C of a given function call.

func CopyFile

func CopyFile(src string, dst string) (err error)

CopyFile copies a file from src to dst

func DirExists

func DirExists(d string) error

DirExists check if a directory exists

Types

This section is empty.

Jump to

Keyboard shortcuts

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