tmp

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package tmp puts every temporary directory the emulator makes under one process-owned root.

Scattered os.MkdirTemp calls leak: a directory is removed by its owner's Close, and a killed process runs no Close. One root per process means a crash leaves exactly one thing behind, and the next run can tell it from a live emulator's and remove it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir(name string) (string, error)

Dir makes a uniquely named directory under this process's root.

func ParentDir

func ParentDir() string

ParentDir is where every process root lives.

func RemoveRoot

func RemoveRoot() error

RemoveRoot deletes this process's root and everything under it.

func Root

func Root() (string, error)

Root returns this process's directory, creating it on first use.

func Sweep

func Sweep() int

Sweep removes the roots of processes that are no longer running, and reports how many it removed. Errors are ignored: another emulator may be sweeping the same directory, and losing that race is not a failure.

func SweepOnce

func SweepOnce() int

SweepOnce removes leftover roots the first time it is called in a process.

Types

This section is empty.

Jump to

Keyboard shortcuts

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