elidoran / cosmos-browserify

Browserify npm modules for client side in Meteor packages
MIT License
78 stars 12 forks source link

Can use it to browse/access client side local filesystem? #27

Closed green-coder closed 8 years ago

green-coder commented 8 years ago

Hi, can we use this plugin to browse/access the client's computer filesystem via Nodejs's fs API?

elidoran commented 8 years ago

This tool is a wrapper around http://browserify.org to bundle npm modules into a file which can be loaded into a browser.

To read what it does to uses of node's core modules please read their website: npm core module compatibility.

I don't see fs mentioned there. And, that makes sense. It would need to do a lot of work to get out of the browser's sandbox and get access to the client machine.

You'll likely want to search for a JS module which does that. It will likely be made for the browser and not require being browserified before sending it to the browser.

green-coder commented 8 years ago

Sorry, I forgot to mention an important detail, I am hoping to run the client from inside Electron, as a desktop app, not from inside a browser. But thank you for the answer, that's clear enough on what can be done or not.