Posted to tcl by colin at Thu Oct 18 22:21:33 GMT 2007view raw

  1. # file link errors with 'could not create new link "./td/sf": target "./td/f1" doesn't exist'
  2.  
  3. puts stderr [package require fileutil]
  4. file mkdir ./td; # make a test directory
  5.  
  6. # create a file and symlink to it
  7. set fd [open ./td/f1 w]; puts $fd content; close $fd; file link -symbolic ./td/sf ./td/f1
  8.  
  9. # create a dir and symlink to it
  10. file mkdir ./td/td1; file link -symbolic ./td/sl ./td/td1/
  11.  
  12. puts stderr [fileutil::find ./td]
  13.