Paul Giaccone wrote:
Rush Manbert wrote:
My first question: Can anyone suggest a better method of achieving the duplicates detection?
Maybe you could use the graph library to build a graph of your directory structure and then work with that to find duplicate paths, loops, etc. I know next to nothing about the library, but this sounds like a graph-theoretic problem to me.
Thanks for the suggestion. The big issue with this approach is actually the same problem I have with my "second question" in the original post. The equivalence information is what really identifies a directory or file, not the path represented as a string. Once I start inheriting from or modifying the path class to get at that information (which I will need in order to uniquely identify the graph nodes), I might as well put them all in a set and test whether a new path is already in the set. - Rush