How to lazy load the file

Hello, as I know, in Theia, the backend load the file when user double click the file in the file explorer, the file is existed in the local storage already.

In my scenario, if I want to open a file in the Operating system library, because the Operating system library could be very large, which might takes up a lot of space in the docker storage. So I want to download the file structure from the file server(which has already been implemented) first, not the whole operating system library. And download the file only when user double click the file in the file explorer.

To achieve the above requirements, I need to intercept the open file command when user double click the file in the file explorer, download the file from the file server before truely open the file. Is there any API in the Theia that could implement such function, and how could intercept the open file command´╝č Thanks~

You can start with this :point_up_2:

OK, Thanks. Another question, what command will be executed when open a file in the file explore?