How to read, write file/directory in Meteor?


#1

I would like to create CRUD generator UI.
how to read, write file/directory in Meteor?
Please help me.


#2

I used the NPM fs system on server side. Not sure if there’s a better way, I didn’t find one https://github.com/KristerV/draka_quality_control/blob/master/server/importData.js#L5


#3

thanks, where document how to use fs?


#4

well you need to google that yourself :smile: search “npm fs”


#5

Thanks again :smiley:


#6

I tried but

I20151115-17:23:40.370(7)? Exception while invoking method 'readFile' Error: ENOENT, no su
ch file or directory 'D:\meteor-app\cpanel\cpanel\sever\gen\_template\collection.js'      

#7

hi, have you got any result of this error ?