Documentation
¶
Overview ¶
Package paths resolves Daisybell's on-disk layout. Everything Daisybell owns lives under one home directory (default ~/.daisybell) so that the managed browser and its profile are always isolated from the user's own browsers.
Index ¶
Constants ¶
const DefaultProfileName = "default"
DefaultProfileName is the profile used when neither --profile nor --profile-dir is given.
const EnvHome = "DAISYBELL_HOME"
EnvHome overrides the Daisybell home directory (default ~/.daisybell).
Variables ¶
This section is empty.
Functions ¶
func MapsKey ¶
MapsKey is the directory of a profile's site maps under Maps: the profile's name, or for a --profile-dir outside the profiles directory (no name) "dir-" and the first 12 hex digits of the SHA-256 of its absolute path, so two such directories never share a map and the path itself is not written anywhere.
func SystemBrowserProfile ¶
SystemBrowserProfile reports whether dir is, or lies inside, the user data directory of a system browser (Chrome, Edge, Brave, Arc, Vivaldi, Opera, Firefox, Safari…) and which one. SPEC §2.1: Daisybell never runs on the human's own browser profile, so --profile-dir there is refused. Matching ignores case (macOS and Windows file systems do) and follows symlinks when the directory exists.
Types ¶
type Layout ¶
type Layout struct {
Home string // ~/.daisybell
Browsers string // ~/.daisybell/browsers/<version>/...
Profiles string // ~/.daisybell/profiles/<name>
}
Layout is the set of directories Daisybell uses.
func (Layout) DefaultProfile ¶
DefaultProfile is the persistent profile directory used when no --profile-dir is given.
func (Layout) Extension ¶
Extension holds the unpacked Cockpit extension builds (~/.daisybell/extension/<hash>).
func (Layout) Maps ¶
Maps holds the learned site maps, one directory per profile (~/.daisybell/maps/<profile key>/<host>.json, see MapsKey).
func (Layout) Profile ¶
Profile is the directory of a named profile (~/.daisybell/profiles/<name>). The caller validates name with ValidName first.
func (Layout) Recordings ¶
Recordings holds the session recordings (~/.daisybell/recordings/<session-id>).