Martin Ongtangco
Martin Ongtangco

Reputation: 23505

is there a generic api/library for reading metadata of all known filetypes in c#?

I need to read & modify metadata of files uploaded in our server. Is there a generic api/library for reading Metadata in a Key-Value type of deal?

This means that it may be proprietary files such as .doc/docx, .xls/xlsx, etc. And free stuff like .rtf, .txt, .jpg

Thanks for all the help

Upvotes: 0

Views: 295

Answers (1)

ssube
ssube

Reputation: 48247

There's no library for reading the metadata of "all known filetypes" in any language, because it's pretty much impossible.

You may be able to find libraries capable of reading a particular format or family of closely-related formats, which is the most common solution and works in most situations.

For the formats you've listed, libraries do exist. JPG has some support built into C#, I think, through some of the System libraries. TXT is simple text, that's supported in most languages. RTF has some support, mainly through the RichTextBox control, I think. For the other two, I would look into Office's SDK or perhaps the Office development stuff for Visual Studio, those might have more information.

There is a program, TrID, that can identify file formats based on their data, which may be of some interest. It doesn't do proper metadata reading, but it is the closest thing to a universal file reader that exists (that I'm aware of).

Upvotes: 1

Related Questions