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

windowsfile

package
v1.45.0 Latest Latest
Warning

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

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

Documentation

Rendered for windows/amd64

Overview

Package windowsfile handles private creation and non-following Windows file opens.

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.

func OpenNoFollow added in v1.39.1

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

OpenNoFollow opens an existing writable leaf without following reparse points. Parent traversal retains normal Windows semantics and requires no directory listing permission. No create, truncate, or permission-changing flags are used.

Types

This section is empty.

Jump to

Keyboard shortcuts

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