Read Text File

Medium
3 views 25 Jan 2026
Read a file path from stdin and print its contents....

Write File Safely

Hard
4 views 25 Jan 2026
Write 'meetcode' to a file path, creating folders if needed....

Append Log Lines

Easy
3 views 25 Jan 2026
Append a new line to meetcode.log with current time....

List Directory Files

Hard
4 views 25 Jan 2026
Read a directory path and print file names sorted....

Path Normalize

Medium
5 views 25 Jan 2026
Normalize a user given path and print the safe version....

File Stats Size

Medium
3 views 25 Jan 2026
Read a file path and print its size in bytes....

Copy File

Hard
5 views 25 Jan 2026
Copy a source file to destination and print COPIED....

Delete File If Exists

Easy
4 views 25 Jan 2026
Delete a file only if it exists, print OK....

Read JSON Config

Medium
3 views 25 Jan 2026
Read config.json and print config.site or 'meetcode'....

Atomic Save Pattern

Hard
3 views 25 Jan 2026
Write JSON to a temp file then rename, print SAVED....

fs.promises ReadFile

Medium
4 views 25 Jan 2026
Read a file using fs.promises and print its length....

Create File If Missing

Easy
4 views 25 Jan 2026
If file does not exist, create it with 'meetcode' and print CREATED/EXISTS....

Rename File

Medium
3 views 25 Jan 2026
Rename a file and print RENAMED or FAIL....

Watch File Changes

Hard
3 views 25 Jan 2026
Watch a file and print CHANGED when it updates (demo)....

Read Large File Line By Line

Hard
4 views 25 Jan 2026
Read a file line by line and print how many lines contain 'meetcode'....

Recursive Folder Size

Hard
5 views 25 Jan 2026
Compute total size of files in a folder recursively....

Temporary File Path

Easy
4 views 25 Jan 2026
Create a temp file path in os.tmpdir and print it....

Compare Two Files By Hash

Hard
5 views 25 Jan 2026
Compare two files by sha256 and print SAME or DIFF....

Resolve User Home Path

Easy
4 views 25 Jan 2026
Join a filename into the user home directory and print it....

Durable Write With fsync

Hard
4 views 25 Jan 2026
Write text to a file and fsync so it is flushed, then print DONE....