Author: Stan Eisenstat
Subject: Re: [Cs323] Symbolic Link Detection
Date: Friday, 04 Sep 2020, 21:56:56
> Message Posted By: Anonymous > > The textbook states: "...lstat returns information about the link itself, > and stat returns information about the file to which the link refers." > Would it be safe to assume that stat() already includes a "check" of sorts > to determine whether something is a symbolic link? (Since the information > returned is what the file is referring to?) The quotation above means that "If A is a symbolic link to file B, then stat("A") returns information about B (including whether B exists) while lstat("B") returns information about A. Does this answer your question? If not, please ask again. --Stan-PREV INDEX NEXT