[haiku-development] Re: How to Identify a file?

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 18 Oct 2007 10:59:06 +0200 CEST

Fredrik Modéen <fredrik@xxxxxxxxx> wrote:
> I'm looking for a "easy" way of identify what type of file a specific
> entry_ref are. thought BFile could give me that but didn't find it.

There is BNode::ReadAttr() and BNodeInfo::GetType() - if a file doesn't
have a MIME type yet, you can identify it using update_mime_info()
first.

> I want to make the Media Player "see" different files. If I drop
> files on
> the Media Player I don't want png files etc to be added to the play
> list
> and If I drop a saved play list on the Media Player I want different
> things happen than with mp3 file.
>
> I was thinking of suporting
> - m3u list
> - Zeta play list
> - perhaps our own? don't know how that one would look like..

I would only add support for m3u lists, as they are more or less
common.

Bek wrote:
> To be honest, I like the idea of being able to display pictures as
> "fake" movies inside of the
> Media Player on Windows for instance. It should be easy implementable
> and I can take care
> of this if you like me to.

What would that be good for? IMO that would just cause lots of
completely superfluous changes, or am I missing something?

Bye,
   Axel.


Other related posts: