Scroll to navigation

SNOBOL4STAT(3) CSNOBOL4 Manual SNOBOL4STAT(3)

NAME

snobol4stat - file status interface for SNOBOL4

SYNOPSYS

-INCLUDE 'stat.sno'

DESCRIPTION

STAT(path) returns file status for path, following symbolic links. LSTAT(path) returns file status for path, returning information on symbolic links. FSTAT(fd) returns file status for the open file descriptor fd. All three return a DATA() object with the following members:

The device number containing the file.
The file number within the device.
Is a STRING identifiying the file type: '-' for a regular file, 'b' for a block special file (device), 'c' for a character special file (device), 'd' for a directory, 'l' for a symbolic link, 'p' for a named pipe (FIFO), 's' for a local (Unix) domain socket, 'w' for a whiteout, '?' for none of the above. (new in CSNOBOL4 2.1)
Is an INTEGER identifiying the file type (ordinal value of ST_TYPE_STR result, for backwards compatibility).
File "mode" (protection and type) bits.
The number of (hard) links to the file.
The owner of the file.
The group of the file.
Device id for special file.
Size in bytes.
Size in blocks.
Preferred block size for file I/O.
Access time in seconds since January 1st, 1970.
fractional access time in nanoseconds.
Data modification time in seconds since January 1st, 1970.
Fractional modification time in nanoseconds.
Metadata change time in seconds since January 1st, 1970.
Fractional change time in nanoseconds.

Values will be the empty string if the data is not available.

SEE ALSO

snobol4(1), stat(2), lstat(2), fstat(2)

AUTHOR

Philip L. Budne

March 31, 2022 CSNOBOL4B 2.3.1