op.rmdir = function(dir) { try { fs.rmdirSync(dir); } catch (err) { if (err.code === 'ENOENT') { } else if (err.code === 'ENOTEMPTY') { throw new NQPException('Failed to rmdir: directory not empty'); } else { throw err; } } };
op.rmdir = function(dir) { fs.rmdirSync(dir); };