debug.go 511 B

123456789101112131415161718192021222324
  1. package naffg
  2. import (
  3. "fmt"
  4. "path/filepath"
  5. )
  6. func (app *Application) Debug_PrintEmbeddedFiles() {
  7. if app.options.UiRes != nil {
  8. fmt.Println("Loaded Embedded Files:")
  9. var printFiles func(dir string)
  10. printFiles = func(dir string) {
  11. fileList, _ := app.options.UiRes.ReadDir(dir)
  12. for _, file := range fileList {
  13. fullPath := filepath.Join(dir, file.Name())
  14. fmt.Println(fullPath)
  15. if file.IsDir() {
  16. printFiles(fullPath)
  17. }
  18. }
  19. }
  20. printFiles(".")
  21. }
  22. }