MCPcopy
hub / github.com/eth0izzle/shhgit / NewMatchFile

Function NewMatchFile

core/match.go:17–28  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

15}
16
17func NewMatchFile(path string) MatchFile {
18 _, filename := filepath.Split(path)
19 extension := filepath.Ext(path)
20 contents, _ := ioutil.ReadFile(path)
21
22 return MatchFile{
23 Path: path,
24 Filename: filename,
25 Extension: extension,
26 Contents: contents,
27 }
28}
29
30func IsSkippableFile(path string) bool {
31 extension := strings.ToLower(filepath.Ext(path))

Callers 1

GetMatchingFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected