Concept Flow - Reading files with promises (fs.promises)
Start
Call fs.promises.readFile
Returns a Promise
Promise Pending
Promise Resolved
Yes→Get file content
Use content
Promise Rejected
No→Handle error
End
This flow shows how reading a file with fs.promises.readFile returns a promise that either resolves with file content or rejects with an error.