MCPcopy Index your code
hub / github.com/SignTools/SignTools / Load

Function Load

src/storage/storage.go:28–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26var Uploads = newUploadResolver()
27
28func Load() {
29 appsPath = filepath.Join(config.Current.SaveDir, "apps")
30 profilesPath = filepath.Join(config.Current.SaveDir, "profiles")
31 uploadsPath = filepath.Join(config.Current.SaveDir, "uploads")
32 requiredPaths := []string{appsPath, profilesPath, uploadsPath}
33 for _, path := range requiredPaths {
34 if err := os.MkdirAll(path, os.ModePerm); err != nil {
35 log.Fatal().Err(err).Msg("mkdir required path")
36 }
37 }
38 if err := Apps.refresh(); err != nil {
39 log.Fatal().Err(err).Msg("refresh apps")
40 }
41 if err := Profiles.refresh(); err != nil {
42 log.Fatal().Err(err).Msg("refresh profiles")
43 }
44 if err := Uploads.refresh(); err != nil {
45 log.Fatal().Err(err).Msg("refresh uploads")
46 }
47}
48
49type fileGetter struct {
50 name string

Callers 2

TestMainFunction · 0.92
mainFunction · 0.92

Calls 1

refreshMethod · 0.45

Tested by 1

TestMainFunction · 0.74