stash/pkg/manager/paths/paths_gallery.go

25 lines
532 B
Go
Raw Normal View History

2019-02-09 12:30:49 +00:00
package paths
import (
2019-02-14 23:42:52 +00:00
"github.com/stashapp/stash/pkg/manager/jsonschema"
2019-02-09 12:30:49 +00:00
"path/filepath"
)
type galleryPaths struct {
config *jsonschema.Config
}
func newGalleryPaths(c *jsonschema.Config) *galleryPaths {
gp := galleryPaths{}
gp.config = c
return &gp
}
func (gp *galleryPaths) GetExtractedPath(checksum string) string {
return filepath.Join(gp.config.Cache, checksum)
}
func (gp *galleryPaths) GetExtractedFilePath(checksum string, fileName string) string {
return filepath.Join(gp.config.Cache, checksum, fileName)
}