paths

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package paths resolves the on-disk locations gmcli reads and writes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layout

type Layout struct {
	Root     string // store root
	Session  string // session.json (libgm AuthData)
	Database string // gmcli.db (SQLite + FTS5)
	MediaDir string // media/ (downloaded attachment cache)
	Socket   string // gmcli.sock (`gmcli serve` unix socket)
}

Layout describes the canonical file layout under a single store directory.

func Resolve

func Resolve(storeOverride string) (Layout, error)

Resolve returns the layout rooted at storeOverride if non-empty, otherwise at $XDG_STATE_HOME/gmcli (falling back to $HOME/.local/state/gmcli). The store directory holds session state, the SQLite archive, and cached media — all of which are reproducible from the phone, so XDG_STATE_HOME is the correct base under the spec. Matches wacli's choice.

func (Layout) DaemonLog

func (l Layout) DaemonLog() string

DaemonLog is where auto-started daemons write their output.

func (Layout) EnsureDirs

func (l Layout) EnsureDirs() error

EnsureDirs creates the store root and media subdirectory with 0700.

Jump to

Keyboard shortcuts

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