"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "extension/filefuncs.3am" between
gawk-5.0.1.tar.xz and gawk-5.1.0.tar.xz

About: GNU awk - pattern scanning and processing language.

filefuncs.3am  (gawk-5.0.1.tar.xz):filefuncs.3am  (gawk-5.1.0.tar.xz)
skipping to change at line 15 skipping to change at line 15
.ft CW .ft CW
@load "filefuncs" @load "filefuncs"
.sp .sp
result = chdir("/some/directory") result = chdir("/some/directory")
.sp .sp
result = stat("/some/path", statdata [, follow]) result = stat("/some/path", statdata [, follow])
.sp .sp
flags = or(FTS_PHYSICAL, ...) flags = or(FTS_PHYSICAL, ...)
.br .br
result = fts(pathlist, flags, filedata) result = fts(pathlist, flags, filedata)
.sp
result = statvfs("/some/path", fsdata)
.ft R .ft R
.SH DESCRIPTION .SH DESCRIPTION
The The
.I filefuncs .I filefuncs
extension adds several functions that provide access to extension adds several functions that provide access to
file-related facilities. file-related facilities.
.SS chdir() .SS chdir()
The The
.B chdir() .B chdir()
function is a direct hook to the function is a direct hook to the
skipping to change at line 57 skipping to change at line 59
In all cases, it clears the In all cases, it clears the
.B statdata .B statdata
array. array.
When the call is successful, When the call is successful,
.B stat() .B stat()
fills the fills the
.B statdata .B statdata
array with information retrieved from the filesystem, as follows: array with information retrieved from the filesystem, as follows:
.TP .TP
\fBstatdata["name"]\fP \fBstatdata["name"]\fP
The name of the file. The name of the file, equal to the first argument passed to
.BR stat() .
.TP .TP
\fBstatdata["dev"]\fP \fBstatdata["dev"]\fP
Corresponds to the Corresponds to the
.I st_dev .I st_dev
field in the field in the
.IR "struct stat" . .IR "struct stat" .
.TP .TP
\fBstatdata["ino"]\fP \fBstatdata["ino"]\fP
Corresponds to the Corresponds to the
.I st_ino .I st_ino
skipping to change at line 304 skipping to change at line 307
as for a file: as for a file:
\fB"path"\fP, \fB"path"\fP,
\fB"stat"\fP, \fB"stat"\fP,
and and
\fB"error"\fP. \fB"error"\fP.
.RE .RE
.PP .PP
The The
.B fts() .B fts()
function returns 0 if there were no errors. Otherwise it returns \-1. function returns 0 if there were no errors. Otherwise it returns \-1.
.SS statvfs()
The
.B statvfs()
function provides a hook into the
.IR statvfs (2)
system call on systems that supply this system call.
It returns zero
upon success or less than zero upon error.
In the latter case it updates
.BR ERRNO .
.PP
When the call is successful,
.B statvfs()
fills the
.B fsdata
array with information retrieved about the filesystem, as follows:
.TP
\fBfsdata["bsize"]\fP
Corresponds to the
.B bsize
member in the
.IR "struct statvfs" .
.TP
\fBfsdata["frsize"]\fP
Corresponds to the
.I f_frsize
member in the
.IR "struct statvfs" .
.TP
\fBfsdata["blocks"]\fP
Corresponds to the
.I f_blocks
member in the
.IR "struct statvfs" .
.TP
\fBfsdata["bfree"]\fP
Corresponds to the
.I f_bfree
member in the
.IR "struct statvfs" .
.TP
\fBfsdata["bavail"]\fP
Corresponds to the
.I f_bavail
member in the
.IR "struct statvfs" .
.TP
\fBfsdata["files"]\fP
Corresponds to the
.I f_files
member in the
.IR "struct statvfs" .
.TP
\fBfsdata["ffree"]\fP
Corresponds to the
.I f_ffree
member in the
.IR "struct statvfs" .
.TP
\fBfsdata["favail"]\fP
Corresponds to the
.I f_favail
member in the
.IR "struct statvfs" .
.TP
\fBfsdata["fsid"]\fP
Corresponds to the
.I f_fsid
member in the
.IR "struct statvfs" .
This member is not available on all systems.
.TP
\fBfsdata["flag"]\fP
Corresponds to the
.I f_flag
member in the
.IR "struct statvfs" .
.TP
\fBfsdata["namemax"]\fP
Corresponds to the
.I f_namemax
member in the
.IR "struct statvfs" .
.SH NOTES .SH NOTES
The AWK The AWK
.B fts() .B fts()
extension does not exactly mimic the interface of the extension does not exactly mimic the interface of the
.IR fts (3) .IR fts (3)
routines, choosing instead to provide an interface that is based routines, choosing instead to provide an interface that is based
on associative arrays, which should be more comfortable to use from on associative arrays, which should be more comfortable to use from
an AWK program. This includes the lack of a comparison function, since an AWK program. This includes the lack of a comparison function, since
.I gawk .I gawk
already provides powerful array sorting facilities. While an already provides powerful array sorting facilities. While an
skipping to change at line 351 skipping to change at line 437
.IR inplace (3am), .IR inplace (3am),
.IR ordchr (3am), .IR ordchr (3am),
.IR readdir (3am), .IR readdir (3am),
.IR readfile (3am), .IR readfile (3am),
.IR revoutput (3am), .IR revoutput (3am),
.IR rwarray (3am), .IR rwarray (3am),
.IR time (3am). .IR time (3am).
.PP .PP
.IR chdir (2), .IR chdir (2),
.IR fts (3), .IR fts (3),
.IR stat (2). .IR stat (2),
.IR statvfs (2).
.SH AUTHOR .SH AUTHOR
Arnold Robbins, Arnold Robbins,
.BR arnold@skeeve.com . .BR arnold@skeeve.com .
.SH COPYING PERMISSIONS .SH COPYING PERMISSIONS
Copyright \(co 2012, 2013, 2018, Copyright \(co 2012, 2013, 2018, 2019,
Free Software Foundation, Inc. Free Software Foundation, Inc.
.PP .PP
Permission is granted to make and distribute verbatim copies of Permission is granted to make and distribute verbatim copies of
this manual page provided the copyright notice and this permission this manual page provided the copyright notice and this permission
notice are preserved on all copies. notice are preserved on all copies.
.ig .ig
Permission is granted to process this file through troff and print the Permission is granted to process this file through troff and print the
results, provided the printed document carries copying permission results, provided the printed document carries copying permission
notice identical to this one except for the removal of this paragraph notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual page). (this paragraph not being relevant to the printed manual page).
 End of changes. 5 change blocks. 
3 lines changed or deleted 90 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)