Loading

Quipoin Menu

Learn • Practice • Grow

node-js / File Stats & Information
mcq
Direction: Choose the correct option

Q1.

Which method returns information about a file or directory?
A. fs.metadata()
B. fs.info()
C. fs.details()
D. fs.stat()
Direction: Choose the correct option

Q2.

How can you check if a path is a file using the Stats object?
A. stats.isDirectory()
B. stats.isFile()
C. stats.kind()
D. stats.type()
Direction: Choose the correct option

Q3.

What does `stats.size` represent?
A. The file size in bytes
B. The number of files in a directory
C. The file permissions
D. The file name length
Direction: Choose the correct option

Q4.

Which property gives the last modification time of a file?
A. stats.atime
B. stats.ctime
C. stats.mtime
D. stats.birthtime
Direction: Choose the correct option

Q5.

What is the difference between `fs.stat()` and `fs.lstat()`?
A. They are identical
B. `lstat` does not follow symbolic links
C. `stat` does not follow symbolic links
D. `lstat` is for directories only