home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / c / cops_104.zip / cops_104 / perl / stat.pl < prev    next >
Text File  |  1992-03-10  |  653b  |  31 lines

  1. ;# $Header: stat.pl,v 3.0.1.1 90/08/09 04:01:34 lwall Locked $
  2. ;# Usage:
  3. ;#    require 'stat.pl';
  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. ;#    require 'stat.pl';
  23. ;#    do Stat('foo');        # sets st_* as a side effect
  24. ;#
  25. sub Stat {
  26.     ($st_dev,$st_ino,$st_mode,$st_nlink,$st_uid,$st_gid,$st_rdev,$st_size,
  27.     $st_atime,$st_mtime,$st_ctime,$st_blksize,$st_blocks) = stat(shift(@_));
  28. }
  29.  
  30. 1;
  31.