#include <TagLibVFSStream.h>
◆ TagLibVFSStream()
TagLibVFSStream::TagLibVFSStream |
( |
const std::string & | strFileName, |
|
|
bool | readOnly ) |
Construct a File object and opens the file. file should be a be an XBMC Vfile.
◆ ~TagLibVFSStream()
TagLibVFSStream::~TagLibVFSStream |
( |
| ) |
|
|
override |
Destroys this ByteVectorStream instance.
◆ bufferSize()
static TagLib::uint MUSIC_INFO::TagLibVFSStream::bufferSize |
( |
| ) |
|
|
inlinestaticprotected |
Returns the buffer size that is used for internal buffering.
◆ clear()
void TagLibVFSStream::clear |
( |
| ) |
|
|
override |
Reset the end-of-file and error flags on the file.
◆ insert()
void TagLibVFSStream::insert |
( |
const TagLib::ByteVector & | data, |
|
|
TagLib::ulong | start = 0, |
|
|
TagLib::ulong | replace = 0 ) |
|
override |
Insert data at position start in the file overwriting replace bytes of the original content.
- Note
- This method is slow since it requires rewriting all of the file after the insertion point.
◆ isOpen()
bool TagLibVFSStream::isOpen |
( |
| ) |
const |
|
override |
Since the file can currently only be opened as an argument to the constructor (sort-of by design), this returns if that open succeeded.
◆ length()
long TagLibVFSStream::length |
( |
| ) |
|
|
override |
Returns the length of the file.
◆ name()
FileName TagLibVFSStream::name |
( |
| ) |
const |
|
override |
Returns the file name in the local file system encoding.
◆ readBlock()
ByteVector TagLibVFSStream::readBlock |
( |
TagLib::ulong | length | ) |
|
|
override |
Reads a block of size length at the current get pointer.
◆ readOnly()
bool TagLibVFSStream::readOnly |
( |
| ) |
const |
|
override |
Returns true if the file is read only (or if the file can not be opened).
◆ removeBlock()
void TagLibVFSStream::removeBlock |
( |
TagLib::ulong | start = 0, |
|
|
TagLib::ulong | length = 0 ) |
|
override |
Removes a block of the file starting a start and continuing for length bytes.
- Note
- This method is slow since it involves rewriting all of the file after the removed portion.
◆ seek()
void TagLibVFSStream::seek |
( |
long | offset, |
|
|
TagLib::IOStream::Position | p = Beginning ) |
|
override |
Move the I/O pointer to offset in the file from position p. This defaults to seeking from the beginning of the file.
- See also
- Position
◆ tell()
long TagLibVFSStream::tell |
( |
| ) |
const |
|
override |
Returns the current offset within the file.
◆ truncate()
void TagLibVFSStream::truncate |
( |
long | length | ) |
|
|
override |
Truncates the file to a length.
◆ writeBlock()
void TagLibVFSStream::writeBlock |
( |
const TagLib::ByteVector & | data | ) |
|
|
override |
Attempts to write the block data at the current get pointer. If the file is currently only opened read only – i.e. readOnly() returns true – this attempts to reopen the file in read/write mode.
- Note
- This should be used instead of using the streaming output operator for a ByteVector. And even this function is significantly slower than doing output with a char[].
The documentation for this class was generated from the following files: