Class AFileOutputStream

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type AFileOutputStream = class(AFileStream)

Description

This class can be used for binary output to any file that is accessible to the underlying file system.

Hierarchy

Overview

Methods

Public constructor toFileNamed(const thisName: string; const overwrite: boolean = false); virtual;
Public function write(const count: TStreamIOSize; const source): TStreamIOSize; override;

Description

Methods

Public constructor toFileNamed(const thisName: string; const overwrite: boolean = false); virtual;

Construct a new stream instance that will write to the file named by thisName.

thisName may represent a relative or absolute path to the file to be written. If the file does not exist, it will be created. If the file exists and overwrite is True, then the contents of the file will be deleted before writing begins; otherwise, new data will be appended to the end of the file.

If the file cannot be accessed for writing, then an exception is raised.

Exceptions raised
AFileStreamOpenError
if the file named by thisName cannot be accessed for writing.
Public function write(const count: TStreamIOSize; const source): TStreamIOSize; override;

Write count bytes from source to the stream. See AStream.write for more information on this method.

.

Returns

The total number of bytes written

Exceptions raised
AFileStreamWriteError
if an error is encountered while attempting to write to the underlying file.

Generated by PasDoc 0.13.0 on 2015-06-23 19:40:11