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

  1. From: bvs@amdcad.uucp (Bakul Shah)
  2.  
  3. In article <586@longway.TIC.COM> Clive Feather <uunet!relay.EU.net!ixi!clive> writes:
  4. > ...
  5. >There is a set of changes to the standard being proposed under the title
  6. >1003.1b (the copy I have is draft 0.1, May 19, 1989). This adds the test macro
  7. >S_ISLNK(m), and the function lstat(). stat() and lstat() differ only in that
  8. >stat() never returns information about a symbolic link, whereas lstat() does.
  9. >Because you cannot open a symbolic link, fstat() is like stat() here.
  10. >
  11. >The draft defines two new functions:
  12. >
  13. >    int readlink (char *path, char *buf, int buf_size);
  14. >
  15. >    int symlink (char *target_path, char *symlink_path);
  16. >
  17. >The functions that operate on links rather than the file pointed to are:
  18. >
  19. >    lstat() readlink() rename() remove() rmdir() symlink() unlink()
  20. >
  21. >The effects of the following functions form an open issue:
  22. >
  23. >    chown() chmod() link() utime()
  24.  
  25. I hope there is time yet to add/consider another function for
  26. completeness sake.
  27.  
  28.     int writelink(char *symlink_path, char *new_target_path)
  29. or if you prefer,
  30.     int updatelink(char *symlink_path, char *new_target_path)
  31.  
  32. This replaces the `contents' of a symlink, thereby *not* breaking
  33. any hard-links to the symlink.  Writelink() is different from
  34. rename(), which changes symlink_path, not what it points to.
  35. Currently there is no way to simulate this behavior and this makes
  36. symlinks a sort of second class objects.
  37.  
  38. -- Bakul Shah
  39.    bvs@BitBlocks.COM
  40.    ..!{ames,att,decwrl,pyramid,sun,uunet}!amdcad!light!bvs
  41.  
  42. Volume-Number: Volume 19, Number 22
  43.  
  44.