statefile

package
v0.3.16 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 5 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 statefile writes small state files off the UI loop, whole each time through lys-lib atomicfile: the newest content handed over wins, an older write still running never lands over it, and Wait returns once every write handed over has ended.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Path string
	// contains filtered or unexported fields
}

File is one state file; the zero File with an empty Path keeps nothing.

func (*File) Wait

func (f *File) Wait()

Wait waits for the writes handed over.

func (*File) Write

func (f *File) Write(data []byte)

Write hands data over to be written, in a directory only the user may enter; a write that fails is logged, as nothing waits on it.

Jump to

Keyboard shortcuts

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