safefs

package
v114.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chown

func Chown(path string, uid int, gid int, recurse bool) error

func CopyFile

func CopyFile(src, dst string, perm os.FileMode) error

CopyFile copies src to dst, following no symlink at either end.

func Create

func Create(file string, perm os.FileMode) (*os.File, error)

func CreateRW

func CreateRW(file string, perm os.FileMode) (*os.File, error)

func Exists

func Exists(path string) (bool, error)

Returns whether or not a path exists. A path we refuse to follow is an error, not an absence

func IsExistingDir

func IsExistingDir(path string) bool

func OpenExistingRDWR

func OpenExistingRDWR(file string) (*os.File, error)

func OpenExistingReadonly

func OpenExistingReadonly(file string) (*os.File, error)

func ReadFile

func ReadFile(path string) ([]byte, error)

ReadFile reads path, following no symlink anywhere.

func Remove

func Remove(path string) error

Removes path, which has to be an empty directory if it is one

func Rename

func Rename(oldpath, newpath string) error

Moves oldpath to newpath without either of them being resolved by name. Both are renamed relative to a directory we opened ourselves and know isn't a link

func WriteFile

func WriteFile(path string, data []byte, perm os.FileMode) error

WriteFile writes data to path, following no symlink at the leaf or anywhere in its prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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