| Description | Hierarchy | Fields | Methods | Properties | 
type unaFileStream = class(unaAbstractStream)
This stream is stored in a file.
![]()  | 
constructor createStream(const fileName: wString; access: unsigned = GENERIC_READ + GENERIC_WRITE; shareMode: unsigned = FILE_SHARE_READ + FILE_SHARE_WRITE; loop: bool = false; fileFlags: unsigned = FILE_ATTRIBUTE_NORMAL); | 
![]()  | 
destructor Destroy(); override; | 
![]()  | 
function getPosition(): int; override; | 
![]()  | 
function initStream(const fileName: wString; access: unsigned = GENERIC_READ + GENERIC_WRITE; shareMode: unsigned = FILE_SHARE_READ + FILE_SHARE_WRITE; loop: bool = false; fileFlags: unsigned = FILE_ATTRIBUTE_NORMAL): bool; | 
![]()  | 
function seek(position: int; fromBeggining: bool = true): int; overload; override; | 
![]()  | 
function seekD(delta: int): int; overload; override; | 
![]()  | 
function clear2(): unaAbstractStream; override; | 
![]()  | 
function getAvailableSize2(): int; override; | 
![]()  | 
function getSize2(): int; override; | 
![]()  | 
function read2(buf: pointer; size: int; remove: bool = true): int; override; | 
![]()  | 
function write2(buf: pointer; size: int): int; override; | 
![]()  | 
procedure AfterConstruction(); override; | 
![]()  | 
procedure close(); | 
![]()  | 
property fileName: wString read f_fileName; | 
![]()  | 
property loop: bool read f_loop write f_loop; | 
![]()  | 
constructor createStream(const fileName: wString; access: unsigned = GENERIC_READ + GENERIC_WRITE; shareMode: unsigned = FILE_SHARE_READ + FILE_SHARE_WRITE; loop: bool = false; fileFlags: unsigned = FILE_ATTRIBUTE_NORMAL); | 
![]()  | 
destructor Destroy(); override; | 
![]()  | 
function getPosition(): int; override; | 
![]()  | 
function initStream(const fileName: wString; access: unsigned = GENERIC_READ + GENERIC_WRITE; shareMode: unsigned = FILE_SHARE_READ + FILE_SHARE_WRITE; loop: bool = false; fileFlags: unsigned = FILE_ATTRIBUTE_NORMAL): bool; | 
![]()  | 
function seek(position: int; fromBeggining: bool = true): int; overload; override; | 
![]()  | 
function seekD(delta: int): int; overload; override; | 
![]()  | 
function clear2(): unaAbstractStream; override; | 
![]()  | 
function getAvailableSize2(): int; override; | 
| 
 Returns number of bytes you can read from the file from current position.  | |
![]()  | 
function getSize2(): int; override; | 
| 
 Returns size of file.  | |
![]()  | 
function read2(buf: pointer; size: int; remove: bool = true): int; override; | 
![]()  | 
function write2(buf: pointer; size: int): int; override; | 
![]()  | 
procedure AfterConstruction(); override; | 
![]()  | 
procedure close(); | 
![]()  | 
property fileName: wString read f_fileName; | 
![]()  | 
property loop: bool read f_loop write f_loop; | 
| 
 When reading beyond the end of file, set this property is true, to wrap at 0 offset.  | |
(c) 2012 Lake of Soft