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

Method compile

magic/compat.py:191–200  ·  view source on GitHub ↗

Compile entries in the colon separated list of database files passed as argument or the default database file if no argument. The compiled files created are named from the basename(1) of each file argument with ".mgc" appended to it. Returns 0 on success and

(self, dbs)

Source from the content-addressed store, hash-verified

189 return _load(self._magic_t, Magic.__tobytes(filename))
190
191 def compile(self, dbs):
192 """
193 Compile entries in the colon separated list of database files
194 passed as argument or the default database file if no argument.
195 The compiled files created are named from the basename(1) of each file
196 argument with ".mgc" appended to it.
197
198 Returns 0 on success and -1 on failure.
199 """
200 return _compile(self._magic_t, Magic.__tobytes(dbs))
201
202 def check(self, dbs):
203 """

Callers 1

_add_compatFunction · 0.80

Calls 1

__tobytesMethod · 0.80

Tested by

no test coverage detected