Let me re-phrase my question. I have server: http://blah.com. The server is just the repository of files. Client has to fetch the files from http://blah.com/scripts folder. It's simple http GET. Every time I don't want to download the files. If the folder has new files I should download only those. So for that, I should know the file names. I will do fs.readDir() on local cache by which I get array of filenames. same way I should be able to do fs.readDir() for http://blah.com/scripts from client machine. I compare the 2 arrays and download the files. But I'm unable to do. It would be great if I get some solution.
On Monday, March 18, 2013 10:29:38 PM UTC+5:30, Mark Hahn wrote: > > Take the server example from the front page of nodejs and add the readDir > to replace the 'hello world' > > > On Mon, Mar 18, 2013 at 12:34 AM, vins <[email protected] <javascript:>>wrote: > >> >> I would like to know the usage of fs,readDir() API to be used with http >> request such that I can get the array of file names of a directory residing >> in the server. >> >> -- >> -- >> Job Board: http://jobs.nodejs.org/ >> Posting guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To post to this group, send email to [email protected]<javascript:> >> To unsubscribe from this group, send email to >> [email protected] <javascript:> >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "nodejs" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" 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/groups/opt_out.
