ownerfile

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package ownerfile makes files accessible to their owner only and checks that they are: mode 0600 and no group or other bits on POSIX, and on Windows, which has no mode bits, a DACL (D68).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNew

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

CreateNew creates the file at path, which must not exist, for reading and writing by its owner only (mode 0600) from the moment it exists.

func CreateTemp

func CreateTemp(dir, pattern string) (*os.File, error)

CreateTemp creates a new temporary file in dir, as os.CreateTemp does, which already creates it with mode 0600.

func OwnerOnly

func OwnerOnly(_ string, info os.FileInfo) (bool, error)

OwnerOnly reports whether info grants no access to the group or to others.

Types

This section is empty.

Jump to

Keyboard shortcuts

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