provide useful ``yes/no''
information about files, but when you need to know, say, the exact date a file
was accessed or modified, or the owner of the file, you will need something more
powerful. Most information of this type could be produced by parsing the output
of some operating system command, but a much more efficient way of getting this
information is to use the stat function. You pass a valid filename to
stat, and it returns an array with thirteen elements, as listed in
Table
.
Many times you will only need to extract a single value from the stat
function. You can use the technique outlined in Section 4.3 to
access only the pieces you want. Like the file test operators
(Section
),
the underscore can also be used to refer to the most recently queried file.