CBFSStorageStream Type
Syntax
CBFSStorage::TCBFSStorageStream
Remarks
The CBFSStorageStream type is returned by some of the CBDrive component's methods. All stream types in CBFS Storage share a common API, inherited from the System::Classes::TStream class, documented below.
Note that, for brevity, many of the properties and methods offered by System::Classes::TStream are not documented here; please refer to Embarcadero's documentation for more information.
Properties | |
Position |
Gets or sets the current position within the stream.
__property __int64 Position = { read=GetPosition, write=SetPosition }; |
Size |
Gets or sets the length of the stream, in bytes.
__property __int64 Size = { read=GetSize, write=SetSize64 }; |
Methods | |
Flush |
Forces all data held by the stream's buffers to be written out to storage.
void __fastcall Flush(); |
Read |
Reads a sequence of bytes from the stream and advances the current position within the stream by the number of bytes read.
int __fastcall Read(void* Buffer, int Count); Buffer specifies the buffer to populate with data from the stream. Count specifies the number of bytes that should be read from the stream. Returns the total number of bytes read into Buffer. This may be less than Count if that many bytes are not currently available, or may be 0 if the end of the stream has been reached. |
Seek |
Sets the current position within the stream based on a particular point of origin.
__int64 __fastcall Seek(const __int64 Offset, TSeekOrigin Origin); Offset specifies the offset in the stream to seek to, relative to Origin, which must be one of the values described by the TStream.Seek documentation. Returns the new position within the stream. |
Write |
Writes a sequence of bytes to the stream and advances the current position within the stream by the number of bytes written.
int __fastcall Write(const void* Buffer, int Count); Buffer specifies the buffer with data to write to the stream. Count specifies the number of bytes that should be written to the stream. Returns the total number of bytes written to the stream. |