(appId string)
| 511 | } |
| 512 | |
| 513 | func GetAppModTime(appId string) (int64, error) { |
| 514 | if err := ValidateAppId(appId); err != nil { |
| 515 | return 0, err |
| 516 | } |
| 517 | |
| 518 | homeDir := wavebase.GetHomeDir() |
| 519 | appNS, appName, err := ParseAppId(appId) |
| 520 | if err != nil { |
| 521 | return 0, err |
| 522 | } |
| 523 | |
| 524 | appPath := filepath.Join(homeDir, "waveapps", appNS, appName) |
| 525 | appGoPath := filepath.Join(appPath, "app.go") |
| 526 | |
| 527 | fileInfo, err := os.Stat(appGoPath) |
| 528 | if err == nil { |
| 529 | return fileInfo.ModTime().UnixMilli(), nil |
| 530 | } |
| 531 | |
| 532 | dirInfo, err := os.Stat(appPath) |
| 533 | if err != nil { |
| 534 | return 0, nil |
| 535 | } |
| 536 | |
| 537 | return dirInfo.ModTime().UnixMilli(), nil |
| 538 | } |
| 539 | |
| 540 | func ListAllEditableApps() ([]wshrpc.AppInfo, error) { |
| 541 | homeDir := wavebase.GetHomeDir() |
no test coverage detected