2024-01-16 18:07:52 +01:00
|
|
|
package initializers
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
2024-02-28 09:13:08 +01:00
|
|
|
var DebugBasePath string = "./assets/"
|
|
|
|
var ReleaseBasePath string = "/data/assets/"
|
2024-01-16 18:07:52 +01:00
|
|
|
|
2024-02-28 09:13:08 +01:00
|
|
|
func CreateAssetsFolder(basePath string) {
|
2024-01-16 18:07:52 +01:00
|
|
|
|
2024-03-02 00:04:00 +01:00
|
|
|
if _, err := os.Stat(basePath); os.IsNotExist(err) {
|
|
|
|
if err := os.MkdirAll(basePath, os.ModePerm); err != nil {
|
2024-01-16 18:07:52 +01:00
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|