system

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lclearxattrs

func Lclearxattrs(path string) error

Lclearxattrs is a wrapper around Llistxattr and Lremovexattr, which attempts to remove all xattrs from a given file.

func Lgetxattr

func Lgetxattr(path string, name string) ([]byte, error)

Lgetxattr is a wrapper around unix.Lgetattr, to abstract the resizing of the returned []string.

func Llistxattr

func Llistxattr(path string) ([]string, error)

Llistxattr is a wrapper around unix.Llistattr, to abstract the NUL-splitting and resizing of the returned []string.

func Lutimes

func Lutimes(path string, atime, mtime time.Time) error

Lutimes is a wrapper around utimensat(2), with the AT_SYMLINK_NOFOLLOW flag set, to allow changing the time of a symlink rather than the file it points to.

func Majordev

func Majordev(device Dev_t) uint64

Majordev returns the major device number given a dev_t, similar to major(3).

func Minordev

func Minordev(device Dev_t) uint64

Minordev returns the minor device number given a dev_t, similar to minor(3).

func Mknod

func Mknod(path string, mode os.FileMode, dev Dev_t) error

Mknod is a wrapper around mknod(2).

func Tarmode

func Tarmode(typeflag byte) uint32

Tarmode takes a Typeflag (from a tar.Header for example) and returns the corresponding os.Filemode bit. Unknown typeflags are treated like regular files.

func Unlink(path string) error

Unlink is a wrapper around unlink(2).

Types

type Dev_t

type Dev_t uint64

Dev_t represents a dev_t structure.

func Makedev

func Makedev(major, minor uint64) Dev_t

Makedev produces a dev_t from the individual major and minor numbers, similar to makedev(3).

Jump to

Keyboard shortcuts

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