MCPcopy Create free account
hub / github.com/B33pBeeps/redthread / diskFile

Struct diskFile

internal/app/storage.go:21–33  ·  view source on GitHub ↗

diskFile is the v4 envelope. v3 fields (TextMode, Notes, Strings, Zoom, HighlightColor) are kept here as optional fallbacks — when a v3 file is loaded, those fields are wrapped into a single board.

Source from the content-addressed store, hash-verified

19// HighlightColor) are kept here as optional fallbacks — when a v3 file is
20// loaded, those fields are wrapped into a single board.
21type diskFile struct {
22 SchemaVersion int `json:"schemaVersion"`
23 ActiveIdx int `json:"activeIdx,omitempty"`
24 Background *Background `json:"background,omitempty"`
25 Boards []*Board `json:"boards,omitempty"`
26
27 // Legacy v3 fields — read on load, never written.
28 LegacyTextMode TextStyleMode `json:"textMode,omitempty"`
29 LegacyZoom int `json:"zoom,omitempty"`
30 LegacyHighlightColor int `json:"highlightColor,omitempty"`
31 LegacyNotes []*Note `json:"notes,omitempty"`
32 LegacyStrings []*StringConn `json:"strings,omitempty"`
33}
34
35func DataPath() (string, error) {
36 var dir, legacyDir string

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected