MCPcopy Create free account
hub / github.com/cloudfoundry/java-buildpack / IsBeans

Method IsBeans

src/java/containers/groovy_utils.go:72–78  ·  view source on GitHub ↗

IsBeans checks if a Groovy file is a beans-style configuration

(filePath string)

Source from the content-addressed store, hash-verified

70
71// IsBeans checks if a Groovy file is a beans-style configuration
72func (g *GroovyUtils) IsBeans(filePath string) bool {
73 content, err := os.ReadFile(filePath)
74 if err != nil {
75 return false
76 }
77 return beansPattern.Match(content)
78}
79
80// isValidGroovyFile checks if a file is a valid, readable Groovy script
81// Filters out binary files, empty files, and files with invalid content

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected