TagFile

TagFile class

Constructors

this
this(string filename)

Create a TagFile from a filename. The file type will be guessed by TagLib.

this
this(string filename, FileType type)

Create a TagFile from a filename. Rather than trying to guess the type it will use the one specified.

this
this(ubyte[] data)

Create a TagFile object from data in memory.

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

appendComplexProp
bool appendComplexProp(string name, TagVariant[string] values)

Append complex property values.

appendProp
void appendProp(string name, string value)

Append a value to a property or clear it.

getComplexProp
TagVariant[string] getComplexProp(string name)

Get a complex property value.

getComplexPropValues
TagVariant[string][string] getComplexPropValues()

A convenience method to get all complex properties and their values.

getProp
string[] getProp(string name)

Get values for a property.

getPropKeys
string[] getPropKeys()

Get property keys for a TagFile.

getPropValues
string[][string] getPropValues()

A convenience method to get all properties and their values.

isValid
bool isValid()

Is file open, readable, and valid information for the Tag/AudioProperties was found.

save
bool save()

Saves the file to disk.

setComplexProp
bool setComplexProp(string name, TagVariant[string] values)

Set complex properties.

setProp
void setProp(string name, string value)

Set a property or clear it.

Properties

album
string album [@property getter]

Get album tag.

album
string album [@property setter]

Set album tag.

artist
string artist [@property getter]

Get artist tag.

artist
string artist [@property setter]

Set artist tag.

audioProps
const(TagLib_AudioProperties)* audioProps [@property getter]

Get audio properties structure for a file.

bitrate
int bitrate [@property getter]

Get the bitrate of the file in kb/s.

channels
int channels [@property getter]

Get the number of channels of the file.

comment
string comment [@property getter]

Get comment tag.

comment
string comment [@property setter]

Set comment tag.

genre
string genre [@property getter]

Get genre tag.

genre
string genre [@property setter]

Set genre tag.

getComplexPropKeys
string[] getComplexPropKeys [@property getter]

Get complex property keys for a TagFile.

length
int length [@property getter]

Get the length of the file in seconds.

samplerate
int samplerate [@property getter]

Get the sample rate of the file in Hz.

tag
TagLib_Tag* tag [@property getter]

Get the Tag associated with a File object.

title
string title [@property getter]

Get title tag.

title
string title [@property setter]

Set title tag.

track
uint track [@property getter]

Get track tag.

track
uint track [@property setter]

Set track tag.

year
uint year [@property getter]

Get year tag.

year
uint year [@property setter]

Set year tag.