sys

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFileAsRoot

func ReadFileAsRoot(ctx context.Context, fn string, allowPrompt bool) ([]byte, error)

func RemoveFileAsRoot added in v0.7.0

func RemoveFileAsRoot(ctx context.Context, fn string) error

func RenameFileAsRoot added in v0.7.0

func RenameFileAsRoot(ctx context.Context, oldFn, newFn string) error

func StartDaemon

func StartDaemon(
	ctx context.Context,
	name string,
	path string,
	args []string,
	env map[string]string,
) error

func SudoReader

func SudoReader(ctx context.Context, fn string, allowPrompt bool) (*sudoReader, error)

func SudoReaderIfNecessary

func SudoReaderIfNecessary(ctx context.Context, fn string, allowPrompt bool) (io.ReadCloser, error)

func WriteFileAsRoot

func WriteFileAsRoot(ctx context.Context, fn string, content io.Reader, mode os.FileMode) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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