home *** CD-ROM | disk | FTP | other *** search
/ Practical Programming in Tcl & Tk (4th Edition) / TCLBOOK4.BIN / pc / exsource.old / 9_3.tcl < prev    next >
Text File  |  2003-04-15  |  228b  |  14 lines

  1. #
  2. # Example 9-3
  3. # Determining whether pathnames reference the same file.
  4. #
  5.  
  6. proc fileeq { path1 path2 } {
  7.     file stat $path1 stat1
  8.     file stat $path2 stat2
  9.     expr {$stat1(ino) == $stat2(ino) && \
  10.             $stat1(dev) == $stat2(dev)}
  11. }
  12.  
  13.  
  14.