MCPcopy Create free account
hub / github.com/krau/SaveAny-Bot / DetectFileExt

Function DetectFileExt

common/utils/fsutil/fs.go:27–33  ·  view source on GitHub ↗
(fp string)

Source from the content-addressed store, hash-verified

25}
26
27func DetectFileExt(fp string) string {
28 mt, err := mimetype.DetectFile(fp)
29 if err != nil {
30 return ""
31 }
32 return mt.Extension()
33}
34
35type File struct {
36 *os.File

Callers 2

ExecuteMethod · 0.92
processElementMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected