CoderProfile

Detailed mode

Stack: Node · 25 questions · 6-9 min

Question 1 of 25

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
Change Mode