photoprism/internal/get/files.go

20 lines
261 B
Go
Raw Normal View History

package get
import (
"sync"
"github.com/photoprism/photoprism/internal/photoprism"
)
var onceFiles sync.Once
func initFiles() {
services.Files = photoprism.NewFiles()
}
func Files() *photoprism.Files {
onceFiles.Do(initFiles)
return services.Files
}