MCPcopy Create free account
hub / github.com/h2non/filetype / Document

Function Document

kind.go:64–66  ·  view source on GitHub ↗

Document tries to match a file as document type

(buf []byte)

Source from the content-addressed store, hash-verified

62
63// Document tries to match a file as document type
64func Document(buf []byte) (types.Type, error) {
65 return doMatchMap(buf, matchers.Document)
66}
67
68// IsDocument checks if the given buffer is an document type
69func IsDocument(buf []byte) bool {

Callers 1

IsDocumentFunction · 0.85

Calls 1

doMatchMapFunction · 0.85

Tested by

no test coverage detected