|
|
HP-UX Reference Volume 3 of 5 > llstat(2) |
|
NAMElstat — get symbolic link status DESCRIPTIONThe lstat() function has the same effect as stat(), except when path refers to a symbolic link. In that case lstat() returns information about the link, while stat() returns information about the file the link references. For symbolic links, the st_mode member will contain meaningful information when used with the file type macros, and the st_size member will contain the length of the pathname contained in the symbolic link. File mode bits and the contents of the remaining members of the stat structure are unspecified. The value returned in the st_size member is the length of the contents of the symbolic link, and does not count any trailing null. RETURN VALUEUpon successful completion, lstat() returns 0. Otherwise, it returns -1 and sets errno to indicate the error. ERRORSThe lstat() function will fail if:
The lstat() function may fail if:
DESCRIPTIONIf the chosen path name or file descriptor refers to a Multi-Level Directory (MLD), and the process does not have the multilevel effective privilege, the i-node number returned in st_ino is the i-node of the MLD itself. The parameters for the lstat() function is as follows:
The stat structure contains the following members:
(Note that the position of items in this list does not necessarily reflect the order of the members in the structure.) ERRORS
No ERROR for the following:
NFSThe st_basemode and st_acl fields are zero on files accessed remotely. st_acl field is applicable to HFS File Systems only. WARNINGSAccess Control Lists - HFS File Systems only Access control list descriptions in this entry apply only to HFS file systems on standard HP-UX operating systems. DEPENDENCIES (CD-ROM)The st_uid and st_gid fields are set to -1 if they are not specified on the disk for a given file. AUTHORstat() and fstat() were developed by AT&T. lstat() was developed by the University of California, Berkeley. |
|