Commit | Line | Data |
378cc40b |
1 | ;# $Header: stat.pl,v 2.0 88/06/05 00:16:29 root Exp $ |
2 | |
3 | ;# Usage: |
4 | ;# @ary = stat(foo); |
5 | ;# $st_dev = @ary[$ST_DEV]; |
6 | ;# |
7 | $ST_DEV = 0 + $[; |
8 | $ST_INO = 1 + $[; |
9 | $ST_MODE = 2 + $[; |
10 | $ST_NLINK = 3 + $[; |
11 | $ST_UID = 4 + $[; |
12 | $ST_GID = 5 + $[; |
13 | $ST_RDEV = 6 + $[; |
14 | $ST_SIZE = 7 + $[; |
15 | $ST_ATIME = 8 + $[; |
16 | $ST_MTIME = 9 + $[; |
17 | $ST_CTIME = 10 + $[; |
18 | $ST_BLKSIZE = 11 + $[; |
19 | $ST_BLOCKS = 12 + $[; |
20 | |
21 | ;# Usage: |
22 | ;# do Stat('foo'); # sets st_* as a side effect |
23 | ;# |
24 | sub Stat { |
25 | ($st_dev,$st_ino,$st_mode,$st_nlink,$st_uid,$st_gid,$st_rdev,$st_size, |
26 | $st_atime,$st_mtime,$st_ctime,$st_blksize,$st_blocks) = stat(shift(@_)); |
27 | } |