32.24. File::stat
The File::stat module provides a method interface to Perl's built-in
stat and lstat functions by replacing them with versions that
return a File::stat object (or undef on failure). This object
has methods that return the like-named structure field name from the
traditional stat(2) syscall; namely, dev, ino, mode,
nlink, uid, gid, rdev, size, atime, mtime,
ctime, blksize, and blocks. You may also import the structure
fields into your own namespace as regular variables using the
":FIELDS" import tag. (This still overrides your stat and
lstat built-ins.) These fields show up as scalar variables named
with a "st_" in front of the field name. That is, the $st_dev
variable corresponds to the $st->dev method.
![]() Copyright © 2001 O'Reilly & Associates. All rights reserved. |
|