From: Nobuyoshi Nakada Date: 2008-04-16T12:00:18+09:00 Subject: Re: cross-platform1: st1.dev == st2.dev and st1.ino == st2.ino considered harmful Hi, At Wed, 16 Apr 2008 00:21:05 +0900, Thomas Enebo wrote in [ruby-core:16393]: > >> It does not get rid of the second use in file_utils which is based > >> on an lstat. So it may still be a good idea to perhaps have > >> FileStat.identical? so results of lstat may still be tested. This > >> could get rid of fu_stat_identical_entry?. > > > > Sounds nice to me, though I'm not sure if it is technically possible > > for a FileStat to detect its identity on Windows. I think it is reasonable to define FileStat.identical? only on the platform providing ino, so that we can check with "defined?" or "respond_to?". > I am not a windows person so I cannot say, but I would think there is > some internal windows API that could perform an identity check. > Daniel? Some windows user can perhaps shed more light on this? No persistent identification is available on Windows. File.identical? looks BY_HANDLE_FILE_INFORMATION, but they are vaild only during the file handle is opened. -- Nobu Nakada