Protected_The underlying I/O stream.
Protected_Whether the file was parsed successfully. Subclasses set this to false
when a fatal parse error is encountered.
Whether an ID3v1 tag was present on disk when the file was opened.
true if an ID3v1 tag was found at the end of the file.
Whether an ID3v2 tag was present on disk when the file was opened.
true if an ID3v2 tag was found before the "fLaC" magic.
Whether a VorbisComment block was present on disk when the file was opened.
true if a XiphComment was read from the FLAC metadata blocks.
Whether the underlying stream is currently open. Synchronous.
Whether this file was parsed successfully.
The name (path) of the underlying stream, as reported by the stream itself. Synchronous.
Returns a shallow copy of the embedded picture list.
Whether the underlying stream is read-only. Synchronous.
Adds a picture to the embedded picture list.
The FlacPicture to append.
Returns the parsed audio properties, or null if properties were not read.
The FlacProperties or null.
Resets the stream position to the beginning (equivalent to
seek(0, Position.Beginning)).
A promise that resolves when the operation is complete.
Returns the complex properties for the given key.
For the "PICTURE" key, each picture block is represented as a VariantMap.
The complex property key (case-insensitive).
An array of variant maps, one per picture (or delegated to the base class).
Returns the list of complex property keys supported by this file.
Includes "PICTURE" if any embedded pictures are present.
An array of supported complex property key strings.
Returns the total length of the stream in bytes.
Note: this is an async method rather than a getter because getters cannot
be async.
A promise resolving to the stream length in bytes.
Searches the stream forward for pattern starting at fromOffset.
The stream cursor is restored to its original position after the search.
If before is provided, the search stops (returning -1) as soon as
before is encountered.
The byte sequence to search for.
Byte offset at which to start searching. Defaults to 0.
Optionalbefore: ByteVectorOptional sentinel; if found before pattern, returns -1.
A promise resolving to the byte offset of the first match, or
-1 if not found.
Inserts data into the stream at start, optionally replacing replace
bytes.
The bytes to insert.
Byte offset at which to insert. Defaults to 0.
Number of bytes to overwrite. Defaults to 0.
A promise that resolves when the operation is complete.
Returns a PropertyMap containing all tag fields exposed by this file's tag. Returns an empty map if no tag is present.
The property map.
Reads up to length bytes from the current stream position.
The maximum number of bytes to read.
A promise resolving to the bytes read as a ByteVector.
Removes length bytes from the stream starting at start.
Byte offset of the first byte to remove. Defaults to 0.
Number of bytes to remove. Defaults to 0.
A promise that resolves when the operation is complete.
Removes the specified picture from the embedded picture list.
The FlacPicture instance to remove.
Removes all embedded pictures from the file.
Removes unsupported properties from the tag.
The list of property keys to remove.
Searches the stream backward for pattern, starting at fromOffset
(default: end of file).
The stream cursor is restored to its original position after the search.
If before is provided, the search stops (returning -1) as soon as
before is encountered while scanning backward.
The byte sequence to search for.
Upper bound for the search. 0 means end of file.
Defaults to 0.
Optionalbefore: ByteVectorOptional sentinel; if found before pattern, returns -1.
A promise resolving to the byte offset of the match, or -1 if
not found.
Writes all pending tag and picture changes back to the underlying stream.
true on success, false if the file is read-only or invalid.
Moves the stream's read/write cursor to offset relative to position.
The byte offset to seek to.
The seek origin. Defaults to Position.Beginning.
A promise that resolves when the seek is complete.
Sets the complex properties for the given key.
For the "PICTURE" key, replaces all embedded pictures with those derived
from the provided variant maps.
The complex property key (case-insensitive).
An array of variant maps describing the new property values.
true if the key was handled, false if delegated to the base class.
Replaces the tag's properties with the supplied map and returns a map of properties that could not be set (unsupported keys).
The new property map to apply.
A map of properties that were not applied.
Removes the tag types indicated by tags from the in-memory representation.
Changes are written to disk the next time save is called.
Bitmask of FlacTagTypes to strip (default: all).
Returns the combined tag (XiphComment > ID3v2 > ID3v1) for this file.
The active CombinedTag.
Returns the current byte offset of the stream cursor.
A promise resolving to the cursor position.
Truncates (or extends) the stream to exactly length bytes.
The desired stream length in bytes.
A promise that resolves when the truncation is complete.
Writes data at the current stream position.
The bytes to write.
A promise that resolves when the write is complete.
Returns the XiphComment (Vorbis Comment) tag.
Optionalcreate: booleanIf true and no XiphComment exists, a new empty one is created.
The XiphComment, or null if not present and create is falsy.
StaticbufferStaticopen
FLAC file format handler.
Supports XiphComment (Vorbis Comment), ID3v2 and ID3v1 tags as well as FLAC picture metadata blocks and audio property reading.
FLAC file structure: [ID3v2] + "fLaC" + metadata blocks + audio frames + [ID3v1]