MCPcopy Create free account
hub / github.com/ahupp/python-magic / buffer

Method buffer

magic/compat.py:155–161  ·  view source on GitHub ↗

Returns a textual description of the contents of the argument passed as a buffer or None if an error occurred and the MAGIC_ERROR flag is set. A call to errno() will return the numeric error code.

(self, buf)

Source from the content-addressed store, hash-verified

153 return Magic.__tostr(_descriptor(self._magic_t, fd))
154
155 def buffer(self, buf):
156 """
157 Returns a textual description of the contents of the argument passed
158 as a buffer or None if an error occurred and the MAGIC_ERROR flag
159 is set. A call to errno() will return the numeric error code.
160 """
161 return Magic.__tostr(_buffer(self._magic_t, buf, len(buf)))
162
163 def error(self):
164 """

Callers 1

detect_from_contentFunction · 0.80

Calls 1

__tostrMethod · 0.80

Tested by

no test coverage detected