Difficulty: 2/10fs.stat, async handling, symlinksYou can use the fs.stat() method to get information about a file or directory, including whether it's a file or directory. Here's an example:javascriptCopyScenario Questions0-2 years experience1You need to write a small script that takes a path from the command line and prints whether it's a file, a directory, or doesn't exist. How would you implement that in Node.js?2If you call fs.stat on a path that is a symbolic link, what will you get, and how would you adjust your code to differentiate a symlink from a regular file?2-5 years experience1Follow-up QuestionsWhat would happen if the path points to a broken symbolic link?How does using the synchronous API affect scalability in a high‑traffic server?Can you describe how you’d test this logic across different operating systems?Suggest Improvement