IOService
Overview
IOService is a class in Aspose.3D FOSS for Python.
IOService acts as a central registry for all importers, exporters, detectors, and plugins, allowing dynamic discovery and creation of format handlers at runtime.
This class declares 12 methods for IOService objects in Python programs.
Available methods include: __init__, __new__, create_exporter, create_importer, detect_format, get_all_plugins, get_plugin_for_extension, get_plugin_for_format, register_detector, register_exporter, register_importer, register_plugin.
Public members are accessible to any Python application after installing the Aspose.3D FOSS for Python package.
Methods
| Signature | Description |
|---|---|
__new__() | Calls new on this IOService instance. |
__init__() | Calls init on this IOService instance. |
register_exporter(exporter: 'Exporter') | Registers a custom Exporter instance for handling specific file formats |
register_importer(importer: 'Importer') | Calls register_importer(importer) on this IOService instance. |
register_detector(detector: 'FormatDetector') | Registers a FormatDetector that can identify file formats from streams Note: FormatDetector is not implemented in the FOSS edition and throws at runtime. |
register_plugin(plugin: 'Plugin') | Registers a Plugin that may provide import, export, and detection capabilities |
detect_format(stream, file_name: str) | Inspects a data stream or filename and returns the matching file format, enabling automatic format selection |
create_exporter(format_type: 'FileFormat') | Creates an Exporter for the given FileFormat |
create_importer(format_type: 'FileFormat') | Creates an Importer for the given FileFormat |
get_plugin_for_format(file_format) | Returns the Plugin responsible for the specified file format |
get_plugin_for_extension(extension: str) | Returns the Plugin associated with the given file extension |
get_all_plugins() | Returns the all plugins. |