osutil

package
v0.0.0-...-2d8d672 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2016 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cp

func Cp(from, to string) error

func DropCapabilities

func DropCapabilities(keepCaps map[uint]bool) error

func Execv

func Execv(cmd string, args []string, env []string) error

func ExistsDir

func ExistsDir(dir string) bool

func ExistsFile

func ExistsFile(file string) bool

func ForceUnmount

func ForceUnmount(target string, flag int) (err error)

ForceUnmount will force an unmount of the target filesystem, regardless if it is mounted or not.

func GetMountsByRoot

func GetMountsByRoot(rootDir string) ([]string, error)

func IsDirEmpty

func IsDirEmpty(dir string) (bool, error)

func LookupGroup

func LookupGroup(id string) (int, error)

func LookupUser

func LookupUser(id string) (int, error)

func Mknod

func Mknod(path string, mode uint32, dev int) error

Mknod unless path does not exists.

func Mounted

func Mounted(mountpoint string) (bool, error)

func RunCmd

func RunCmd(name string, arg ...string) error

func SetGroup

func SetGroup(id string) error

func SetUser

func SetUser(id string) error

func Setgid

func Setgid(id int) error

func Setuid

func Setuid(id int) error
func Symlink(oldname, newname string) error

Symlink, but ignore already exists file.

func UmountRoot

func UmountRoot(rootDir string) (err error)

func Unmount

func Unmount(target string, flag int) error

Unmount will unmount the target filesystem, so long as it is mounted.

Types

This section is empty.

Jump to

Keyboard shortcuts

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