datadir

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 6 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 datadir locates plugyard's per-user data directory, which holds the sockets of running sites, their saved state and their logs.

Index

Constants

View Source
const Env = "PLUGYARD_DATA_DIR"

Env names an environment variable that overrides the data directory.

Variables

This section is empty.

Functions

func Path

func Path() (string, error)

Path returns the data directory:

Windows  %LOCALAPPDATA%\plugyard
macOS    ~/Library/Application Support/plugyard
Linux    $XDG_DATA_HOME/plugyard, or ~/.local/share/plugyard

It does not create the directory.

func SiteBase

func SiteBase(dataDir, siteName string) string

SiteBase returns the path, without extension, of the files a site keeps in the data directory: its socket, its saved state and its log. The name is a short hash, because site names may be long or contain characters that file names cannot, and socket paths have a tight length limit.

Types

This section is empty.

Jump to

Keyboard shortcuts

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