Deep mode
Stack: Node · 35 questions · 10-14 min
Question 1 of 35
Node
How do you write fs operations?
Choose the option closest to your real coding style.
Option A
const data = fs.readFileSync(path);Option B
const data = await fs.promises.readFile(path, 'utf8');Option C
const data = await readFile(path, 'utf8'); // wrapped with typed errors