Skip to main content
ctx.erase(file) erases a file: its own unit closes, its bytes go, and its fact’s history stays readable for the table’s history. It returns the erasure’s sys.erasures point. Delete or patch the fact that kept the file in the same transaction. ctx.retire takes only a member.
You can also just delete the fact. A stored file that no committed fact keeps is retired by the host, so a library that drops a fact needs no second write. Erasing closes the file’s own unit, so it is admitted as any erasure is: only in the live world (not inside a branch), from a function whose label is at or below the file’s, by a caller whose role lists the file’s label in erase (each of its labels; a public file names none), by a site that may write the file’s table when the file names one, and judged by act.erase guards on the file’s unit. A role that clears a label without erasing it refuses GrantRequired. Grant both rights to let a finance clerk erase files:
To destroy a file’s facts in every version, with evidence, erase their unit; see data lifetime.