I have just started learning Node.js and was wondering if I misunderstood the code's intent,I thought the code shown below will print 'file opened' in the terminal or command prompt only when I open that text file but after I initiated the Node.js file, 'file opened' already appeared before opening the text file.
var fs = require('fs');
var readStream = fs.createReadStream('./new1.txt')
readStream.on('open', function(){console.log("file opened")})