int stat(const char *filename, struct stat *buf); int fstat(int fd, struct stat *buf);
Do we need to open a file to get its attributes?
To access the attributes of a file, do we need to access the file's entry in file desriptor table, in file table, and/or in vnode table?
stat() implemented by first calling
open() to get a file descriptor of the given file, and then calling
fstat() or something equivalent on the file descriptor?