New implementation for os.sameFile on Windows

Hard-links on Windows are now treated just as they are on POSIX.
The new implementation is faster than the previous, but still it's quite
slower than fstat (use with caution).
This commit is contained in:
Zahary Karadjov 2011-12-07 00:53:27 +02:00
commit 0e609d2101
3 changed files with 66 additions and 25 deletions

View file

@ -302,7 +302,7 @@ when not defined(ECMAScript):
posix_gettimeofday(a)
result = toFloat(a.tv_sec) + toFloat(a.tv_usec)*0.00_0001
elif defined(windows):
var f: winlean.Filetime
var f: winlean.TFiletime
GetSystemTimeAsFileTime(f)
var i64 = rdFileTime(f) - epochDiff
var secs = i64 div rateDiff