Plugin File Open Jun 2026
# plugin.py from hostapi import FileOpenHandler
# Fallback to native open return native_open(filepath) plugin file open
class CustomHandler(FileOpenHandler): def can_handle(self, path): return path.endswith('.encrypted') # plugin
def host_open_file(filepath): handlers = plugin_mgr.get_matching_handlers(filepath) handlers.sort(key=lambda h: h.priority, reverse=True) for handler in handlers: result = handler.before_open(filepath) if result.action == "HANDLE_FULLY": data = handler.open(filepath) return data elif result.action == "MODIFY_PATH": filepath = result.new_path plugin file open