From d3fc9e9dc3adc83cfe2c1c7f6ea77993a6e2fe88 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 28 Oct 1999 19:25:46 +0000 Subject: Added lstat(). --- doc/posix_users/files.t | 60 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/posix_users/files.t b/doc/posix_users/files.t index 2ae34b1e18..86c613d92a 100644 --- a/doc/posix_users/files.t +++ b/doc/posix_users/files.t @@ -37,6 +37,7 @@ The directives provided by the files and directories manager are: @item @code{rename} - Renames a file @item @code{stat} - Gets information about a file. @item @code{fstat} - Gets file status +@item @code{lstat} - Gets file status @item @code{access} - Check permissions for a file. @item @code{chmod} - Changes file mode @item @code{fchmod} - Changes permissions of a file @@ -1419,8 +1420,8 @@ NONE #include int fstat( -int fildes, -struct stat *buf + int fildes, + struct stat *buf ); @end example @end ifset @@ -1444,7 +1445,60 @@ to by the @code{buf} argument. @subheading NOTES: -NONE +If the filesystem object referred to by @code{fildes} is a +link, then the information returned in @code{buf} refers +to the destination of that link. This is in contrast to +@code{lstat()} which does not follow the link. + +@c +@c +@c +@page +@subsection lstat - Gets file status + +@findex lstat +@cindex gets file status + +@subheading CALLING SEQUENCE: + +@ifset is-C +@example +#include +#include + +int lstat( + int fildes, + struct stat *buf +); +@end example +@end ifset + +@ifset is-Ada +@end ifset + +@subheading STATUS CODES: + +@table @b +@item EBADF +Invalid file descriptor + +@end table + +@subheading DESCRIPTION: + +The @code{lstat()} function obtains information about the file +associated with @code{fildes} and writes it to the area pointed +to by the @code{buf} argument. + +@subheading NOTES: + +If the filesystem object referred to by @code{fildes} is a +link, then the information returned in @code{buf} refers +to the link itself. This is in contrast to @code{fstat()} +which follows the link. + +The @code{lstat()} routine is defined by BSD 4.3 and SVR4 +and not included in POSIX 1003.1b-1996. @c @c -- cgit v1.2.3