[plt-scheme] Determine that two paths point to same file?
2009/5/26 Erich Rast <erich at snafu.de>:
> [...]
> Is there a PLT scheme-native way to reliably determine whether two paths
> point to the same file or folder? Which path "normalization" function should
> I use?
> [...]
Hello,
regardless of which path normalization you use, comparing two paths
will never be sufficient to determine whether they point to the same
file on a POSIX system -- there may always be more than one hard link
to a file.
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.
cu,
Thomas
--
When C++ is your hammer, every problem looks like your thumb.