Commit | Line | Data |
0adf28fd |
1 | ;# This legacy library is deprecated and will be removed in a future |
2 | ;# release of perl. |
3 | ;# |
378cc40b |
4 | ;# Usage: |
e929a76b |
5 | ;# require 'stat.pl'; |
378cc40b |
6 | ;# @ary = stat(foo); |
7 | ;# $st_dev = @ary[$ST_DEV]; |
8 | ;# |
0adf28fd |
9 | |
378cc40b |
10 | $ST_DEV = 0 + $[; |
11 | $ST_INO = 1 + $[; |
12 | $ST_MODE = 2 + $[; |
13 | $ST_NLINK = 3 + $[; |
14 | $ST_UID = 4 + $[; |
15 | $ST_GID = 5 + $[; |
16 | $ST_RDEV = 6 + $[; |
17 | $ST_SIZE = 7 + $[; |
18 | $ST_ATIME = 8 + $[; |
19 | $ST_MTIME = 9 + $[; |
20 | $ST_CTIME = 10 + $[; |
21 | $ST_BLKSIZE = 11 + $[; |
22 | $ST_BLOCKS = 12 + $[; |
23 | |
24 | ;# Usage: |
e929a76b |
25 | ;# require 'stat.pl'; |
378cc40b |
26 | ;# do Stat('foo'); # sets st_* as a side effect |
27 | ;# |
28 | sub Stat { |
29 | ($st_dev,$st_ino,$st_mode,$st_nlink,$st_uid,$st_gid,$st_rdev,$st_size, |
30 | $st_atime,$st_mtime,$st_ctime,$st_blksize,$st_blocks) = stat(shift(@_)); |
31 | } |
a687059c |
32 | |
33 | 1; |