[plt-scheme] Determine that two paths point to same file?

From: Thomas Chust (chust at web.de)
Date: Tue May 26 17:24:59 EDT 2009

2009/5/26 Eli Barzilay <eli at barzilay.org>:
> On May 26, Thomas Chust wrote:
>>
>> Probably the best way to determine whether two paths are actually
>> aliases for the same file on a POSIX system is to stat them and to
>> compare both the device and inode numbers of the results for
>> identity.
>>
>> However, I don't think PLT Scheme has any builtin procedures to do
>> that.
>
> See `port-file-identity' (which Matthew referred to in his reply).

Hello,

it's good that this is possible for open ports, but is there any
reason why it isn't possible to obtain the same kind of "hash codes"
from a path rather than an open port? Is it maybe due to differences
between the POSIX and Windows APIs?

For example if you have paths pointing to directories you can't check
whether they are identical by opening them and comparing their
port-file-identities...

cu,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.


Posted on the users mailing list.