fs.readdirSync() Method
fs.readdirSync() Method sits in an upload job. Rohit’s job is read a big CSV. Write that first.
Keep fs.readdirSync() Method small. Rohit should finish read a big CSV in a few lines, not a 40-line dump.
Without fs.readdirSync() Method, an upload job gets messy and read a big CSV is hard to trust.
fs.readdirSync() Method shows up in an upload job. Name read a big CSV, not “a real-world scenario”.
fs.readdirSync() Method trap — loading the whole file into RAM. Rohit loses marks for that every viva.
fs.readdirSync() Method is not a lonely heading. Rohit ties it to read a big CSV.
Viva for fs.readdirSync() Method — what it is → createReadStream → the mistake (loading the whole file into RAM).
Say fs.readdirSync() Method in one breath, then createReadStream, then loading the whole file into RAM.