TagLib::FileRef vs. TagLib::File
Nouvelle Collection
nouvellecollection at gmail.com
Tue May 21 13:09:47 UTC 2013
Thanks ! I finally found the answer and have done my coding with
TagLib::File. Thanks again.
2013/5/21 Theofilos Intzoglou <int.teo at gmail.com>:
> You should take a look at the api documentation. Most of the classes (if not
> all) have a description.
> From http://taglib.github.io/api/classTagLib_1_1FileRef.html :
>
> "FileRef exists to provide a minimal, generic and value-based wrapper around
> a File. It is lightweight and implicitly shared, and as such suitable for
> pass-by-value use. This hides some of the uglier details of TagLib::File and
> the non-generic portions of the concrete file implementations.
>
> This class is useful in a "simple usage" situation where it is desirable to
> be able to get and set some of the tag information that is similar across
> file types."
>
>
>
> 2013/5/19 Nouvelle Collection <nouvellecollection at gmail.com>
>>
>> Hello,
>> I don't really understand the difference between TagLib::FileRef and
>> TagLib::File.
>>
>> If I use TagLib::FileRef f("foo.mp3");, then I cannot use
>> f.tag()->removeFrames(...).
>>
>> With TagLib::MPEG::File f("foo.mp3"), it seems possible to do
>> f.ID3v2Tag()->removeFrames.
>>
>>
>> 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.
>> _______________________________________________
>> taglib-devel mailing list
>> taglib-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/taglib-devel
>
>
>
> _______________________________________________
> taglib-devel mailing list
> taglib-devel at kde.org
> https://mail.kde.org/mailman/listinfo/taglib-devel
>
More information about the taglib-devel
mailing list