files

package
v0.7.0-rc.12 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package files provides the durable file operations used by managed updates. Paths are chosen by trusted code and must be under owned, non-writable parents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(path string, directory bool) error

func CheckAncestors

func CheckAncestors(path string) error

func Copy

func Copy(source, dest string, mode os.FileMode) error

func Directory

func Directory(path string, mode os.FileMode) error

Directory checks ancestors before creating anything. Root-owned sticky parents are permitted for isolated tests; production uses /var/lib and /run.

func Hash

func Hash(path string) (string, error)

func Lock

func Lock(path string) (func(), error)

Lock never removes its inode. Every helper mutation and worker shares it.

func Remove

func Remove(path string) error

func Replace

func Replace(path string, mode os.FileMode, write func(io.Writer) error) error

func Sync

func Sync(path string) error

func Write

func Write(path string, data []byte, 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