I am developing a file comparison tool. Using a FileStream
I get the content of the file. But I want to compare also the metadata such as name, modification date and version (if any).
Can I get these informations all at once ?
Or should I do it in two steps and which class to use then for the metadata ?
EDIT : Actually the link to the duplicated question proposes a solution based on a COM microsoft dll reference to add to the project. From my first tests it does not work as simply as it seams, and also it looks like this solution is strongly dependent of the OS version being used, and so we loose one of the C#.Net features that is that you don't need to worry much about which OS version that will be launching the app.
I was looking for the equivalent in C#.Net of this COM dll. Apparently there is none, so I will get some of the metadata using FileInfo
and FileVersionInfo
. It is not as great as I expected but I will go on like this.