fs.dirent.isBlockDevice() Method
fs.dirent.isBlockDevice() Method is simple if you keep it on paper. Amit uses it for read a big CSV in an upload job.
Keep fs.dirent.isBlockDevice() Method small. Amit should finish read a big CSV in a few lines, not a 40-line dump.
fs.dirent.isBlockDevice() Method exists so Amit can keep read a big CSV correct in an upload job.
fs.dirent.isBlockDevice() Method shows up in an upload job. Name read a big CSV, not “a real-world scenario”.
fs.dirent.isBlockDevice() Method trap — loading the whole file into RAM. Amit loses marks for that every viva.
Place fs.dirent.isBlockDevice() Method next to nearby Node.js work — createReadStream is the link.
Close fs.dirent.isBlockDevice() Method with: “If I skip it, read a big CSV goes wrong like this: loading the whole file into RAM.”
Board: read a big CSV. Dry-run fs.dirent.isBlockDevice() Method. Name the trap: loading the whole file into RAM.