home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.19 / text0017.txt < prev    next >
Encoding:
Internet Message Format  |  1990-05-17  |  1.5 KB

  1. From: Clive Feather <uunet!relay.EU.net!ixi!clive>
  2.  
  3. In article <580@longway.TIC.COM> std-unix@uunet.uu.net writes:
  4. > The posix 1003.1 standard has cleverly evaded naming of bits
  5. > in the mode field of the stat structure. it does this by
  6. > defining tests (like S_ISDIR(mode) rather than (mode&S_IFMT)==S_IFDIR).
  7. > the question is, how do people deal with sym links? I simply
  8. > added a S_ISLNK macro but would prefer to go with the flow
  9. > if there is one.
  10.  
  11. There is a set of changes to the standard being proposed under the title
  12. 1003.1b (the copy I have is draft 0.1, May 19, 1989). This adds the test macro
  13. S_ISLNK(m), and the function lstat(). stat() and lstat() differ only in that
  14. stat() never returns information about a symbolic link, whereas lstat() does.
  15. Because you cannot open a symbolic link, fstat() is like stat() here.
  16.  
  17. The draft defines two new functions:
  18.  
  19.     int readlink (char *path, char *buf, int buf_size);
  20.  
  21.     int symlink (char *target_path, char *symlink_path);
  22.  
  23. The functions that operate on links rather than the file pointed to are:
  24.  
  25.     lstat() readlink() rename() remove() rmdir() symlink() unlink()
  26.  
  27. The effects of the following functions form an open issue:
  28.  
  29.     chown() chmod() link() utime()
  30. -- 
  31. Clive D.W. Feather  | IXI Limited           | +44 223 462 131 (v)
  32. clive@ixi.co.uk     | 62-74 Burleigh Street | +44 224 462 132 (fax)
  33. ...!uunet!ixi!clive | Cambridge  U.K.       |-----------------------------
  34.                     | CB1  1OJ              | Silly quote being thought up
  35.  
  36.  
  37. Volume-Number: Volume 19, Number 17
  38.  
  39.