aboutsummaryrefslogtreecommitdiffstats
path: root/extension/readdir.3am
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-09-07 13:34:26 +0300
committerArnold D. Robbins <arnold@skeeve.com>2012-09-07 13:34:26 +0300
commit000380108735d54f472a7825a865d0308ed357cb (patch)
tree7927f124ed67d7c2347ba9e44e9e79b57e167fc3 /extension/readdir.3am
parent472dc41713ee71609b2ddc8c77c00adb34354154 (diff)
downloadegawk-000380108735d54f472a7825a865d0308ed357cb.tar.gz
egawk-000380108735d54f472a7825a865d0308ed357cb.tar.bz2
egawk-000380108735d54f472a7825a865d0308ed357cb.zip
Revise readdir_do_ftype() argument.
Diffstat (limited to 'extension/readdir.3am')
-rw-r--r--extension/readdir.3am15
1 files changed, 10 insertions, 5 deletions
diff --git a/extension/readdir.3am b/extension/readdir.3am
index e7c6ee4f..4479c61d 100644
--- a/extension/readdir.3am
+++ b/extension/readdir.3am
@@ -1,11 +1,11 @@
-.TH READDIR 3am "Aug 23 2012" "Free Software Foundation" "GNU Awk Extension Modules"
+.TH READDIR 3am "Aug 31 2012" "Free Software Foundation" "GNU Awk Extension Modules"
.SH NAME
readdir \- directory input parser for gawk
.SH SYNOPSIS
.ft CW
@load "readdir"
.sp
-readdir_do_ftype(2) # or 0 or 1
+readdir_do_ftype("stat") # or "dirent" or "never"
.ft R
.SH DESCRIPTION
The
@@ -43,16 +43,21 @@ for a socket, and
(unknown) for anything else.
.PP
On systems without the file type information, calling
-.B readdir_do_ftype(2)
+.B readdir_do_ftype("stat")
causes the extension to use
.IR stat (2)
to retrieve the appropriate information. This is not the default, since
.IR stat (2)
is a potentially expensive operation. By calling
-.B readdir_do_ftype(0)
+.B readdir_do_ftype("never")
one can ensure that the file type
information is never displayed, even when readily available in the
directory entry.
+.PP
+The third option,
+.B 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.
.SH NOTES
On GNU/Linux systems, there are filesystems that don't support the
.B d_type
@@ -61,7 +66,7 @@ entry (see
and so the file type is always
.BR u .
Therefore, using
-.B readdir_do_ftype(2)
+.B readdir_do_ftype("stat")
is advisable even on GNU/Linux systems. In this case, the
.I readdir
extension will fall back to using