aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawk.info
diff options
context:
space:
mode:
Diffstat (limited to 'doc/gawk.info')
-rw-r--r--doc/gawk.info168
1 files changed, 77 insertions, 91 deletions
diff --git a/doc/gawk.info b/doc/gawk.info
index b74c023c..e99a6e81 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -24522,21 +24522,20 @@ File: gawk.info, Node: Extension Sample Readdir, Next: Extension Sample Revout
16.6.5 Reading Directories
--------------------------
-The `readdir' extension adds an input parser for directories, and adds
-a single function named `readdir_do_ftype()'. The usage is as follows:
+The `readdir' extension adds an input parser for directories. The
+usage is as follows:
@load "readdir"
- readdir_do_ftype("stat") # or "dirent" or "never"
-
When this extension is in use, instead of skipping directories named
on the command line (or with `getline'), they are read, with each entry
returned as a record.
- The record consists of at least two fields: the inode number and the
-filename, separated by a forward slash character. On systems where the
-directory entry contains the file type, the record has a third field
-which is a single letter indicating the type of the file:
+ The record consists of three fields. The first two are the inode
+number and the filename, separated by a forward slash character. On
+systems where the directory entry contains the file type, the record
+has a third field which is a single letter indicating the type of the
+file:
Letter File Type
--------------------------------------------------------------------------
@@ -24549,27 +24548,14 @@ Letter File Type
`s' Socket
`u' Anything else (unknown)
- On systems without the file type information, calling
-`readdir_do_ftype("stat")' causes the extension to use the `lstat()'
-system call to retrieve the appropriate information. That is not the
-default, because `lstat()' is a potentially expensive operation. By
-calling `readdir_do_ftype("never")' one can ensure that the file type
-information is never displayed, even when readily available in the
-directory entry.
-
- The third option, `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.
-
- The `readdir_do_ftype()' function sets `ERRNO' if called without
-arguments or with invalid arguments.
+ On systems without the file type information, the third field is
+always `u'.
NOTE: On GNU/Linux systems, there are filesystems that don't
support the `d_type' entry (see the readdir(3) manual page), and
- so the file type is always `u'. Therefore, using
- `readdir_do_ftype("stat")' is advisable even on GNU/Linux systems.
- In this case, the `readdir' extension falls back to using
- `lstat()' when it encounters an unknown file type.
+ so the file type is always `u'. You can use the `filefuncs'
+ extension to call `stat()' in order to get correct type
+ information.
Here is an example:
@@ -32183,70 +32169,70 @@ Node: Extension Sample Fnmatch983690
Node: Extension Sample Fork985416
Node: Extension Sample Ord986630
Node: Extension Sample Readdir987406
-Node: Extension Sample Revout989746
-Node: Extension Sample Rev2way990339
-Node: Extension Sample Read write array991029
-Node: Extension Sample Readfile992912
-Node: Extension Sample API Tests993667
-Node: Extension Sample Time994192
-Node: gawkextlib995499
-Node: Language History997880
-Node: V7/SVR3.1999402
-Node: SVR41001723
-Node: POSIX1003165
-Node: BTL1004173
-Node: POSIX/GNU1004907
-Node: Common Extensions1010442
-Node: Ranges and Locales1011549
-Ref: Ranges and Locales-Footnote-11016167
-Ref: Ranges and Locales-Footnote-21016194
-Ref: Ranges and Locales-Footnote-31016454
-Node: Contributors1016675
-Node: Installation1020971
-Node: Gawk Distribution1021865
-Node: Getting1022349
-Node: Extracting1023175
-Node: Distribution contents1024867
-Node: Unix Installation1030089
-Node: Quick Installation1030706
-Node: Additional Configuration Options1032668
-Node: Configuration Philosophy1034145
-Node: Non-Unix Installation1036487
-Node: PC Installation1036945
-Node: PC Binary Installation1038244
-Node: PC Compiling1040092
-Node: PC Testing1043036
-Node: PC Using1044212
-Node: Cygwin1048397
-Node: MSYS1049397
-Node: VMS Installation1049911
-Node: VMS Compilation1050514
-Ref: VMS Compilation-Footnote-11051521
-Node: VMS Installation Details1051579
-Node: VMS Running1053214
-Node: VMS Old Gawk1054821
-Node: Bugs1055295
-Node: Other Versions1059147
-Node: Notes1064462
-Node: Compatibility Mode1065049
-Node: Additions1065832
-Node: Accessing The Source1066759
-Node: Adding Code1068185
-Node: New Ports1074227
-Node: Derived Files1078362
-Ref: Derived Files-Footnote-11083670
-Ref: Derived Files-Footnote-21083704
-Ref: Derived Files-Footnote-31084304
-Node: Future Extensions1084402
-Node: Basic Concepts1085889
-Node: Basic High Level1086570
-Ref: figure-general-flow1086841
-Ref: figure-process-flow1087440
-Ref: Basic High Level-Footnote-11090669
-Node: Basic Data Typing1090854
-Node: Glossary1094209
-Node: Copying1119520
-Node: GNU Free Documentation License1157077
-Node: Index1182214
+Node: Extension Sample Revout988910
+Node: Extension Sample Rev2way989503
+Node: Extension Sample Read write array990193
+Node: Extension Sample Readfile992076
+Node: Extension Sample API Tests992831
+Node: Extension Sample Time993356
+Node: gawkextlib994663
+Node: Language History997044
+Node: V7/SVR3.1998566
+Node: SVR41000887
+Node: POSIX1002329
+Node: BTL1003337
+Node: POSIX/GNU1004071
+Node: Common Extensions1009606
+Node: Ranges and Locales1010713
+Ref: Ranges and Locales-Footnote-11015331
+Ref: Ranges and Locales-Footnote-21015358
+Ref: Ranges and Locales-Footnote-31015618
+Node: Contributors1015839
+Node: Installation1020135
+Node: Gawk Distribution1021029
+Node: Getting1021513
+Node: Extracting1022339
+Node: Distribution contents1024031
+Node: Unix Installation1029253
+Node: Quick Installation1029870
+Node: Additional Configuration Options1031832
+Node: Configuration Philosophy1033309
+Node: Non-Unix Installation1035651
+Node: PC Installation1036109
+Node: PC Binary Installation1037408
+Node: PC Compiling1039256
+Node: PC Testing1042200
+Node: PC Using1043376
+Node: Cygwin1047561
+Node: MSYS1048561
+Node: VMS Installation1049075
+Node: VMS Compilation1049678
+Ref: VMS Compilation-Footnote-11050685
+Node: VMS Installation Details1050743
+Node: VMS Running1052378
+Node: VMS Old Gawk1053985
+Node: Bugs1054459
+Node: Other Versions1058311
+Node: Notes1063626
+Node: Compatibility Mode1064213
+Node: Additions1064996
+Node: Accessing The Source1065923
+Node: Adding Code1067349
+Node: New Ports1073391
+Node: Derived Files1077526
+Ref: Derived Files-Footnote-11082834
+Ref: Derived Files-Footnote-21082868
+Ref: Derived Files-Footnote-31083468
+Node: Future Extensions1083566
+Node: Basic Concepts1085053
+Node: Basic High Level1085734
+Ref: figure-general-flow1086005
+Ref: figure-process-flow1086604
+Ref: Basic High Level-Footnote-11089833
+Node: Basic Data Typing1090018
+Node: Glossary1093373
+Node: Copying1118684
+Node: GNU Free Documentation License1156241
+Node: Index1181378

End Tag Table