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:
parent
446b042188
commit
0e609d2101
3 changed files with 66 additions and 25 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue