How to open downloaded files in XD programmatically?

Hello,

I am downloading files with .ai extensions. I want to open that file in XD programmatically right after download completed. I searched XD platform for it but unable to found any solution. Is there any API that I can call to open the file through plugin?

Help me out…!

Thanks

Manoj