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

Method descriptor

magic/compat.py:147–153  ·  view source on GitHub ↗

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

(self, fd)

Source from the content-addressed store, hash-verified

145 return Magic.__tostr(_file(self._magic_t, Magic.__tobytes(filename)))
146
147 def descriptor(self, fd):
148 """
149 Returns a textual description of the contents of the argument passed
150 as a file descriptor or None if an error occurred and the MAGIC_ERROR
151 flag is set. A call to errno() will return the numeric error code.
152 """
153 return Magic.__tostr(_descriptor(self._magic_t, fd))
154
155 def buffer(self, buf):
156 """

Callers 1

detect_from_fobjFunction · 0.80

Calls 1

__tostrMethod · 0.80

Tested by

no test coverage detected