Sorry, unfortunately not. This is because the fopen and fread are blocking/synchronous operations, but web http requrests are asynchronous by nature. The emscripten library wget functions are best for this purpose.
If you don't want to immediately read the files when fetching them with wget, you can wget the files in advance (asynchronously), and then place them in the emscripten virtual file system for later fopen+fread (synchronous) purposes. That is sometimes a good middle-ground for porting old code that requires synchronous code paths. Jukka 2014-05-21 19:08 GMT+03:00 Lee Morgan <[email protected]>: > Hi, > > Is it possible to access files from the server (ie the one serving my > emscripten.js) through the filesystem c api? > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
