Add a mapping between a type and an extension. When the extension is already known, the new type will replace the old one. When the type is already known the extension will be added to the list of known extensions. If strict is true, information will be added to list of sta
(type, ext, strict=True)
| 386 | return _db.guess_extension(type, strict) |
| 387 | |
| 388 | def add_type(type, ext, strict=True): |
| 389 | """Add a mapping between a type and an extension. |
| 390 | |
| 391 | When the extension is already known, the new |
| 392 | type will replace the old one. When the type |
| 393 | is already known the extension will be added |
| 394 | to the list of known extensions. |
| 395 | |
| 396 | If strict is true, information will be added to |
| 397 | list of standard types, else to the list of non-standard |
| 398 | types. |
| 399 | """ |
| 400 | if _db is None: |
| 401 | init() |
| 402 | return _db.add_type(type, ext, strict) |
| 403 | |
| 404 | |
| 405 | def init(files=None): |
no test coverage detected