Run nodejs file system module client side

43 views
Skip to first unread message

meet tank

unread,
Jun 1, 2017, 2:19:17 PM6/1/17
to nodejs
Hello All,

Is it possible to use nodejs file system module at client side?

Thanks,
Meet

Alex Wells

unread,
Jun 3, 2017, 2:47:31 PM6/3/17
to nodejs
No this isn't possible I'm afraid - the browser doesn't have access to the local filesystem for good security reasons, but also, when you 'browserify' or package up node JS modules to be run on the client, they must necessarily use just JavaScript, since that's all the browser can execute. It cannot execute arbitrary C code on the host platform!

There are all sorts of security reasons why this isn't possible.

However, what is it you are trying to do? What do you want from, or to do to, the file system?

Jason Zheng

unread,
Jul 30, 2017, 3:57:54 PM7/30/17
to nodejs
It's not possible in browser except in nw.js or electron .
Reply all
Reply to author
Forward
0 new messages