TagLib::FileRef vs. TagLib::File

Nouvelle Collection nouvellecollection at gmail.com
Sun May 19 18:44:45 UTC 2013

I don't really understand the difference between TagLib::FileRef and

If I use TagLib::FileRef f("foo.mp3");, then I cannot use

With TagLib::MPEG::File f("foo.mp3"), it seems possible to do

Why is there 2 different things : TagLib::FileRef and TagLib::File
for the same task (i.e. working with a file) ?

When is it better to open a file with TagLib::MPEG::File f("foo.mp3")
and when is it better to use TagLib::FileRef f("foo.mp3")    (like in
the simple example in http://taglib.github.io/api/) ?

Thanks in advance.

More information about the taglib-devel mailing list