Help us shape the future of Go! Take the 2026 Go Developer Survey

windowsfile

package
v1.39.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Rendered for windows/amd64

Overview

Package windowsfile creates exclusive Windows files and directories with private permissions.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidName = errors.New("private file requires a local filename")
	ErrOwner       = errors.New("cannot inspect private file owner")
	ErrPermissions = errors.New("cannot prepare private file permissions")
)

Callers translate these setup failures into their own diagnostics.

Functions

func CreatePrivate

func CreatePrivate(root *os.Root, name string) (*os.File, error)

CreatePrivate creates one leaf in root, without replacing an existing file. The protected DACL grants full access to the current user, SYSTEM, and Administrators. Set it at creation: later changes cannot revoke access through existing handles.

func CreatePrivateDirectory

func CreatePrivateDirectory(path string) (*os.File, error)

CreatePrivateDirectory creates path with a protected, inheritable private DACL. It preserves parent traversal without requiring permission to list the parent.

Types

This section is empty.

Jump to

Keyboard shortcuts

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