Note that workers *can* do synchronous file IO. So if the code can run in a
worker, this should work now (or is something we should fix). I hope we'll
explore more ways to let code run in workers, which is good for various
reasons, including the sync IO issue, perhaps over this summer.

- Alon



On Wed, May 21, 2014 at 9:19 AM, Jukka Jylänki <[email protected]> wrote:

> 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.
>

-- 
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.

Reply via email to