sys

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SysProcAttr = &syscall.SysProcAttr{}
)

Functions

func CreateSymlink(oldPath string, newPath string) error

*

CreateSymlink creates a symbolic link, requires administrator privileges

@param oldPath The path to the existing file or directory @param newPath The path where the symbolic link should be created

func GetSymlinkTarget

func GetSymlinkTarget(path string) (string, error)

GetSymlinkTarget retrieves the target path of a symbolic link

func IsAdmin

func IsAdmin() bool

IsAdmin checks if the current process has administrator privileges

func IsSymlink(path string) bool

IsSymlink checks if the specified path is a symbolic link

func RequireAdmin

func RequireAdmin() error

RequireAdmin checks for administrator privileges, returns an error if not present

Types

This section is empty.

Jump to

Keyboard shortcuts

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