Durable Write With fsync

NodeJS Hard 3 views
Back to Questions

Problem Description

Write text to a file and fsync so it is flushed, then print DONE.

Input Format

stdin: file path.

Output Format

Print DONE/FAIL.

Sample Test Case

Input:
meetcode.txt
Output:
DONE

Constraints

Use fs.openSync and fs.fsyncSync.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev