| Calling Sequence
| FileStat(path)
|
| Parameters
| | Name | Type | Description |
|
| path
| string | a filename or a path |
| st_dev
| posint | device |
| st_ino
| posint | inode |
| st_mode
| posint | protection |
| st_nlink
| posint | number of hard links |
| st_uid
| integer | user ID of owner |
| st_gid
| integer | group ID of owner |
| st_rdev
| integer | device type (if inode device) |
| st_size
| integer | total size, in bytes |
| st_blksize
| posint | blocksize for filesystem I/O |
| st_blocks
| integer | number of blocks allocated |
| st_atime
| posint | time of last access |
| st_mtime
| posint | time of last modification |
| st_ctime
| posint | time of last change |
|
| Return Type
| FileStat |
| Synopsis
| This class stores the unix stat structure, see
"man 2 stat" in any unix system for details.
When called with a single argument, it constructs the entire
structure.
The unix names have been retained for the fields.
This operation is very efficient, it only requires reading the
directory and completes without the execution of any system
command. Hence it is the recommended way of finding any
information about a file.
When the file does not exist, an empty data structure is
returned. |
| Examples
| > FileStat(libname)[st_size];
81920
> FileStat('/dev/null')[st_mtime];
1270571999
> FileStat(non_existing_file);
FileStat()
|
| See also
| inputoutput, OpenAppending, OpenReading, OpenWriting, ReadData, ReadLine, ReadRawFile, ReadRawLine, SearchDelim, SplitLines |