Extracted from Pike v7.3 release 14 at 2002-02-15.
pike.roxen.com
[Top]
Stdio
Stdio.Stat

Class Stdio.Stat

Description

This object is used to repreaent file ststus information from eg file_stat.

It contains the following items usually found in a C struct stat: dev, ino, mode, nlink, uid, gid, rdev, size, atime, mtime and ctime.

It also contains some items that correspond to the C IS* macros: islnk, isreg, isdir, ischr, isblk, isfifo and issock.

And then two that are Pike-specific:

type

The type encoded as a string.

mode_string

The file mode encoded as a string in ls -l style.

Additionally, the object may casted to array (in which case a 'traditional' LPC stat-array will result), but it's also possible to index the object directly with integers, which then will correspond to the array.

The indices are:

Array
int mode 
int size

Size of the file, or -2=directory, -3=symlink and -4=device.

int atime 
int mtime 
int ctime 
int uid 
int gid