Hello again everyone, Today, I was exploring the FileSystem library of nodeJs and I would like to share about difference between two methods I was studying. We already know about a function fs.open(FileName,Mode,Callback), allow us to open the file and it also allow us to do whatever we want to do with the file like writting etc. where as on the other hand fs.openSync(FileName, Mode), only allows you to open the file in particular format you are looking in. This is because it is a synchronous method and it helps to code one after other. fs.openSync() will not allow you to do anything which we were able to do in fs.open() through its callback. And also fs.Open() does not return anything whereas fs.openSync() returns the file descriptor for the identification of the file. Thank you, That's it for today!!!
Posts
- Get link
- Other Apps
Hi guys, I am student in Seneca College pursuing computer programming and analysis. I have completed 4 semesters and this path, so far has taught me so much already, about programming. Before pursuing this course, I never had programming experience but after completing my Grade 12 in science I decided to change my field to computer science which was a huge decision for me at that time, as not even one subject in computers before and ended up taking a advance level programming diploma, sounds crazy right! The path itself was crazy. Every semester some thing new, new challenges to overcome, new interests developing. It was so much fun. I just started my 5th semester in January, 2019. I took 4 programming courses, all are so much to gain from but one course named open source development showed me the real world, how nowadays people put their codes open available in the market to get issues raised form people and fixed form people. I find this way of development very interesting, as it