files

package
v0.1.87 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 5 Imported by: 1 module, 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 keeps one mod's files as modlock-host does: the files the mod wrote, in a directory of its own, over the files its build ships in data/.

Index

Constants

View Source
const Quota = 4 << 20

Quota bounds the bytes one mod's written files hold together.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mod

type Mod struct {
	// Written is the directory that keeps the files the mod writes, or empty
	// to refuse its writes.
	Written string
	// Data holds the files the build ships, or is nil for none.
	Data fs.FS
}

Mod is one mod's files.

func (*Mod) Read

func (m *Mod) Read(name string) (string, bool, error)

Read returns the text of the file name, from the written files when they hold one and from the build's otherwise, and false when neither does.

func (*Mod) Write

func (m *Mod) Write(name, text string) error

Write replaces the file name in the written files with text, whole or not at all, while they stay within Quota.

Jump to

Keyboard shortcuts

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