How can you check if a given path is a file or a directory in Node.js? | File Operations | nodejs Interview Questions | NextRound.in