Message117238
With following implementation, issamefile return True
for hard link. I heard GetFinalPathNameByHandle
returns different paths for hard links.
>>> import nt, os
>>> def issamefile(path1, path2):
... fd1 = os.open(path1, os.O_RDONLY)
... fd2 = os.open(path2, os.O_RDONLY)
... fi1 = nt._getfileinformation(fd1)
... fi2 = nt._getfileinformation(fd2)
... os.close(fd1)
... os.close(fd2)
... return fi1 == fi2
...
>>> issamefile("src.txt", "lnk.txt")
True |
|
Date |
User |
Action |
Args |
2010-09-23 22:02:26 | ocean-city | set | recipients:
+ ocean-city, giampaolo.rodola, brian.curtin |
2010-09-23 22:02:26 | ocean-city | set | messageid: <1285279346.29.0.763938711941.issue8879@psf.upfronthosting.co.za> |
2010-09-23 22:02:24 | ocean-city | link | issue8879 messages |
2010-09-23 22:02:24 | ocean-city | create | |
|