aboutsummaryrefslogtreecommitdiffstats
path: root/extension/readdir.3am
diff options
context:
space:
mode:
Diffstat (limited to 'extension/readdir.3am')
-rw-r--r--extension/readdir.3am16
1 files changed, 11 insertions, 5 deletions
diff --git a/extension/readdir.3am b/extension/readdir.3am
index 4479c61d..5e03f491 100644
--- a/extension/readdir.3am
+++ b/extension/readdir.3am
@@ -1,4 +1,4 @@
-.TH READDIR 3am "Aug 31 2012" "Free Software Foundation" "GNU Awk Extension Modules"
+.TH READDIR 3am "Sep 11 2012" "Free Software Foundation" "GNU Awk Extension Modules"
.SH NAME
readdir \- directory input parser for gawk
.SH SYNOPSIS
@@ -45,9 +45,9 @@ for a socket, and
On systems without the file type information, calling
.B readdir_do_ftype("stat")
causes the extension to use
-.IR stat (2)
+.IR lstat (2)
to retrieve the appropriate information. This is not the default, since
-.IR stat (2)
+.IR lstat (2)
is a potentially expensive operation. By calling
.B readdir_do_ftype("never")
one can ensure that the file type
@@ -55,9 +55,15 @@ information is never displayed, even when readily available in the
directory entry.
.PP
The third option,
-.B readdir_do_ftype("dirent") ,
+.BR readdir_do_ftype("dirent") ,
takes file type information from the directory entry, if it is available.
This is the default on systems that supply this information.
+.PP
+The
+.B readdir_do_ftype()
+function will set
+.B ERRNO
+if called without arguments or with invalid arguments.
.SH NOTES
On GNU/Linux systems, there are filesystems that don't support the
.B d_type
@@ -70,7 +76,7 @@ Therefore, using
is advisable even on GNU/Linux systems. In this case, the
.I readdir
extension will fall back to using
-.IR stat (2)
+.IR lstat (2)
when it encounters an unknown file type.
... .SH BUGS
.SH EXAMPLE