fs

package
v3.1.0-rc3+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvalRelative

func EvalRelative(path string, root string) string

EvalRelative evaluates symlinks in path relative to root path. This function doesn't return error but always returns an evaluated path

func IsDir

func IsDir(name string) bool

IsDir check if name component is a directory

func IsExec

func IsExec(name string) bool

IsExec check if name component has executable bit permission set

func IsFile

func IsFile(name string) bool

IsFile check if name component is regular file

func IsLink(name string) bool

IsLink check if name component is a symlink

func IsOwner

func IsOwner(name string, uid uint32) bool

IsOwner check if name component is owned by user identified with uid

func IsSuid

func IsSuid(name string) bool

IsSuid check if name component has setuid bit permission set

func Mkdir

func Mkdir(path string, mode os.FileMode) error

Mkdir creates a directory if it doesn't exist with mode after umask reset

func MkdirAll

func MkdirAll(path string, mode os.FileMode) error

MkdirAll creates a directory and parents if it doesn't exist with mode after umask reset

func RootDir

func RootDir(path string) string

RootDir returns the root directory of path (rootdir of /my/path is /my). Returns "." if path is empty

func Touch

func Touch(path string) error

Touch behaves like touch command.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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