Node.js and File System on Windows - EBUSY error
filesystems, node.js, windows
Solution
Hiberfil.sys is a system file that holds the hibernation data onto disk, you cannot just read it via normal rights, it's super confidential since it hold all memory information on disk.
Problem
I'm new to Node.js and I'm trying to figure out what is wrong with the following code. ``` var fs = require('fs'); var dir = "C:\\"; var files = fs.readdirSync(dir); for (var i = 0; i < files.length; i++) { var name = fs.statSync(dir + files[i]).name; } ``` When running this code I get the error: ``` Error: EBUSY, resource busy or locked 'C:\hiberfil.sys' at Object.statSync (fs.js:424:18) at Object.<anonymous> (S:\start.js:7:19) at Module._compile (module.js:446:26) at Object..js (module.js:464:10) at Module.load (module.js:353:31) at Function._load (module.js:311:12) at Array.0 (module.js:484:10) at EventEmitter._tickCallback (node.js:190:38) ```