Plugins: Replace CDN class with FS CDN type (#113968)

replace cdn class with fs type
This commit is contained in:
Will Browne
2025-11-20 14:03:24 +00:00
committed by GitHub
parent 3999d108f7
commit 7d179120b6
21 changed files with 122 additions and 114 deletions
+16 -1
View File
@@ -72,12 +72,27 @@ type UpdateInfo struct {
type FS interface {
fs.FS
Type() string
Type() FSType
Base() string
Files() ([]string, error)
Rel(string) (string, error)
}
type FSType string
const (
FSTypeCDN FSType = "cdn"
FSTypeLocal FSType = "local"
)
func (f FSType) CDN() bool {
return f == FSTypeCDN
}
func (f FSType) Local() bool {
return f == FSTypeLocal
}
type FSRemover interface {
Remove() error
}