node-taglib-sharp / Exports / ApeTagItem
Class that represents a property in an APE tag.
• get
isEmpty(): boolean
Gets whether the current instance is empty.
boolean
• get
isReadOnly(): boolean
Gets whether the current instance is flagged as read-only on disk.
boolean
• get
key(): string
Gets the key that specified the contents of the item.
Remarks
This value is used for specifying the contents of the item in a common and
consistent fashion. For example, TITLE
specifies that the item contains the title of
the track.
string
• get
size(): number
Size of the current instance as it last appeared on disk.
number
• get
text(): string
[]
Gets the string values stored in the current item, if the current item is a text item, or an empty array if the current item is a binary item or no text is stored.
string
[]
• get
type(): ApeTagItemType
Gets the type of value contained in the current instance.
• get
value(): ByteVector
Gets the binary value stored in the current item, if the current item is a binary item, or
undefined
if the current item is a text item.
▸ clone(): ApeTagItem
Creates a deep copy of the current instance.
▸ render(): ByteVector
Renders the current instance as an APEv2 item.
▸ toString(): string
Gets the contents of the current instance as a string. If the current instance is binary or
does not have a text array, undefined
will be returned. Otherwise, the text values will be
joined into a single, comma separated list.
string
▸ Static
fromBinaryValue(key
, value
): ApeTagItem
Constructs and initializes a new instance of ApeTagItem with a specified key and binary data to use as the value.
Name | Type | Description |
---|---|---|
key |
string |
Key to use for the item |
value |
ByteVector |
Binary data to store as the value |
▸ Static
fromData(data
, offset
): ApeTagItem
Constructs a new instance of ApeTagItem by reading in a raw APEv2 item.
Name | Type | Description |
---|---|---|
data |
ByteVector |
ByteVector containing the item to read |
offset |
number |
Index into data at which to begin reading the item data. Must be a positive 32-bit integer. |
▸ Static
fromTextValues(key
, ...values
): ApeTagItem
Constructs and initializes a new instance of ApeTagItem with a specified key and collection of text values.
Name | Type | Description |
---|---|---|
key |
string |
Key to use for the item |
...values |
string [] |
Values to store in the item |