1. Write a function to read a file and return its directory name, pathname, and extension name.
2. What is your understanding of async/await, promises, and callbacks? Please provide relevant examples.
3. What is your understanding of middleware, and how would you implement it?