stash/pkg/models/paths/paths.go
Bob bb76aff557 Able to Generate
Lots of errors to fix and TODO notes
2026-04-22 21:43:27 -07:00

36 lines
755 B
Go

// Package paths provides functions to return paths to various resources.
package paths
import (
"path/filepath"
"github.com/stashapp/stash/pkg/fsutil"
)
type Paths struct {
Generated *generatedPaths
Scene *scenePaths
Audio *audioPaths
SceneMarkers *sceneMarkerPaths
Blobs string
}
func NewPaths(generatedPath string, blobsPath string) Paths {
p := Paths{}
p.Generated = newGeneratedPaths(generatedPath)
p.Scene = newScenePaths(p)
p.SceneMarkers = newSceneMarkerPaths(p)
p.Blobs = blobsPath
return p
}
func GetStashHomeDirectory() string {
return filepath.Join(fsutil.GetHomeDirectory(), ".stash")
}
func GetDefaultDatabaseFilePath() string {
return filepath.Join(GetStashHomeDirectory(), "stash-go.sqlite")
}