Difference between lstat fstat and stat in C

I was also searching for stat vs lstat vs fstat and although there is already an answer to this question, I’d like to see it formatted like that:

lstat() is identical to stat(), except that if pathname is a symbolic
link, then it returns information about the link itself, not the file
that it refers to.

fstat() is identical to stat(), except that the file about which
information is to be retrieved is specified by a file descriptor
(instead of a file name).

http://man7.org/linux/man-pages/man2/stat.2.html

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)