FileStream

Qualified name: delphivcl.FileStream

class FileStream

Bases: HandleStream

TFileStream enables applications to read from and write to a file on disk. Use TFileStream to access the information in disk files. TFileStream will open a named file and provide methods to read from or write to it. If an application already has a handle to the file, opened in the appropriate mode, use THandleStream instead.

Methods

ReadBytes

Read content as bytes.

ReadFloat

Read content as float.

ReadInt

Read content as integer.

ReadString

Read content as string.

WriteBytes

Write content as bytes.

WriteFloat

Write content as float.

WriteInt

Write content as integer.

WriteString

Write content as string.

Attributes

Capabilities

StreamCapabilities:

ClassName

Returns the TObject.ClassName

FileName

Preserves the file name of the file associated with the file stream.

Handle

Specifies the handle for the communications resource the stream reads from and writes to.

Position

Indicates the current offset into the stream for reading and writing.

Size

Indicates the size in bytes of the stream.

ClassName

Returns the TObject.ClassName

FileName

Preserves the file name of the file associated with the file stream. Use FileName to display the name of the file that TFileStream has accessed from disk. This is a read only property.

Type:

str

ReadBytes()

Read content as bytes.

ReadFloat()

Read content as float.

ReadInt()

Read content as integer.

ReadString()

Read content as string.

WriteBytes()

Write content as bytes.

WriteFloat()

Write content as float.

WriteInt()

Write content as integer.

WriteString()

Write content as string.