removal

package
v0.7.55-dev.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package removal deletes what a run or a build leaves that must not stay on disk (a run's secrets file, a knowledge pack's pages and documents in the clear), and says when it could not. On Windows, Docker Desktop's file sharing can keep a handle on a file for a moment after its container is removed, and a file or a directory with an open handle cannot be deleted; so a failed delete is retried there for a bounded time before it is given up.

Index

Constants

This section is empty.

Variables

View Source
var (
	Tries = triesFor(runtime.GOOS)
	Delay = 250 * time.Millisecond
)

Tries and Delay bound the retry: about five seconds on Windows, one try elsewhere, where a delete that fails will not succeed by waiting.

Functions

func Gone

func Gone(path string) bool

Gone says whether nothing is left at path.

func Remove

func Remove(path string, all bool) error

Remove deletes path (all: with everything under it), retrying as Tries and Delay allow. Something already gone is not an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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