A stream representation of a directory. More...
#include <RVNGDirectoryStream.h>
Public Member Functions | |
RVNGDirectoryStream (const char *path) | |
Construct a stream for directory path . | |
virtual | ~RVNGDirectoryStream () |
virtual bool | isStructured () |
Analyses the content of the input stream to see whether it is an OLE2 storage. | |
virtual unsigned | subStreamCount () |
virtual const char * | subStreamName (unsigned id) |
virtual bool | existsSubStream (const char *name) |
virtual RVNGInputStream * | getSubStreamByName (const char *name) |
Extracts a named stream from an OLE2 storage. | |
virtual RVNGInputStream * | getSubStreamById (unsigned id) |
virtual const unsigned char * | read (unsigned long numBytes, unsigned long &numBytesRead) |
Tries to read a given number of bytes starting from the current position inside the input stream. | |
virtual int | seek (long offset, RVNG_SEEK_TYPE seekType) |
Moves to the next location inside the input stream. | |
virtual long | tell () |
Returns the actual position inside the input stream. | |
virtual bool | isEnd () |
Determines whether the current position is at the end of the stream. | |
Public Member Functions inherited from librevenge::RVNGInputStream | |
RVNGInputStream () | |
virtual | ~RVNGInputStream () |
Static Public Member Functions | |
static RVNGDirectoryStream * | createForParent (const char *path) |
Create a stream for parent directory of path . | |
static bool | isDirectory (const char *path) |
Test whether path is a directory. |
Private Member Functions | |
RVNGDirectoryStream (const RVNGDirectoryStream &) | |
RVNGDirectoryStream & | operator= (const RVNGDirectoryStream &) |
Private Attributes | |
RVNGDirectoryStreamImpl * | m_impl |
A stream representation of a directory.
A valid stream (i.e., one created for an existing directory) is always structured. The content handling operations (read
, seek
, tell
, isEnd
) are always empty.
|
private |
Referenced by createForParent(), getSubStreamByName(), operator=(), and RVNGDirectoryStream().
|
explicit |
Construct a stream for directory path
.
If path
is not a directory, only an empty shell is constructed and isStructured()
returns false
.
|
virtual |
|
static |
Create a stream for parent directory of path
.
The stream is always structured. If the parent directory does not exist, 0 is returned.
Referenced by operator=().
|
virtual |
Implements librevenge::RVNGInputStream.
Referenced by operator=().
|
virtual |
Implements librevenge::RVNGInputStream.
Referenced by operator=().
|
virtual |
Extracts a named
stream from an OLE2 storage.
named
stream if it exists. named
stream does not exist inside the OLE2 storage or if the input stream is not an OLE2 storage. Implements librevenge::RVNGInputStream.
Referenced by operator=().
|
static |
Test whether path
is a directory.
true
if path is a directory, false
otherwise. Referenced by operator=().
|
virtual |
Determines whether the current position is at the end of the stream.
Implements librevenge::RVNGInputStream.
Referenced by operator=().
|
virtual |
Analyses the content of the input stream to see whether it is an OLE2 storage.
Implements librevenge::RVNGInputStream.
Referenced by operator=().
|
private |
|
virtual |
Tries to read a given number of bytes starting from the current position inside the input stream.
numBytes | Number of bytes desired to be read. |
numBytesRead | Number of bytes that were possible to be read. |
Implements librevenge::RVNGInputStream.
Referenced by operator=().
|
virtual |
Moves to the next location inside the input stream.
offset | The offset of the location inside the input stream to move to. It is relative either to the current position or to the beginning of the input stream depending on the value of the seekType parameter. |
seekType | Determines whether the offset is relative to the beginning of the input stream (RVNG_SEEK_SET ) or to the current position (RVNG_SEEK_CUR ). |
offset
is beyond the end of the input stream or before its beginning). Implements librevenge::RVNGInputStream.
Referenced by operator=().
|
virtual |
Implements librevenge::RVNGInputStream.
Referenced by operator=().
|
virtual |
Implements librevenge::RVNGInputStream.
Referenced by operator=().
|
virtual |
Returns the actual position inside the input stream.
Implements librevenge::RVNGInputStream.
Referenced by operator=().
|
private |
Referenced by existsSubStream(), getSubStreamByName(), isStructured(), RVNGDirectoryStream(), subStreamCount(), tell(), and ~RVNGDirectoryStream().