fileutil

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2016 License: Apache-2.0 Imports: 9 Imported by: 71

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyRegularFile added in v0.9.0

func CopyRegularFile(src, dest string) (err error)
func CopySymlink(src, dest string) error

func CopyTree

func CopyTree(src, dest string, uidRange *user.UidRange) error

func DirSize added in v0.14.0

func DirSize(path string) (int64, error)

DirSize takes a path and returns its size in bytes

func IsDeviceNode added in v1.13.0

func IsDeviceNode(path string) bool

IsDeviceNode checks if the given path points to a block or char device. It doesn't follow symlinks.

func IsExecutable added in v1.5.0

func IsExecutable(path string) bool

IsExecutable checks if the given path points to an executable file by checking the executable bit. Inspired by os.exec.LookPath()

func LUtimesNano

func LUtimesNano(path string, ts []syscall.Timespec) error

TODO(sgotti) waiting for a utimensat functions accepting flags and a LUtimesNano using it in https://github.com/golang/sys/

func Lgetxattr added in v0.7.0

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

Returns a nil slice and nil error if the xattr is not set

func Lsetxattr added in v0.7.0

func Lsetxattr(path string, attr string, data []byte, flags int) error

func TimeToTimespec

func TimeToTimespec(time time.Time) (ts syscall.Timespec)

TODO(sgotti) use UTIMES_OMIT on linux if Time.IsZero ?

Types

This section is empty.

Jump to

Keyboard shortcuts

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