Foxit PDF SDK

Public Member Functions | List of all members
IFX_FileWrite Class Referenceabstract
FXCRT

File writing interface. More...

Inheritance diagram for IFX_FileWrite:

## Public Member Functions
virtual FX_BOOL | Flush ()=0
| Flush internal buffer of the file. More...
virtual FX_INT64 | GetSize ()=0
| Get total size of the file. More...
virtual void | Release ()=0
| Called when to release everything.
virtual FX_BOOL | WriteBlock (const void *pData, FX_INT64 offset, size_t size)=0
| Write a block data. More...
virtual FX_BOOL | WriteBlock (const void *pData, size_t size)
| Write a block data to the end. More...

## Detailed Description

File writing interface.

## Member Function Documentation

## ◆ Flush()

virtual FX_BOOL IFX_FileWrite::Flush | ( |  | ) |
| pure virtual

Flush internal buffer of the file.

Returns
  true means success, while false means failure.

Reimplemented from IFX_StreamWrite.

Implemented in CFX_CachedFileRead, IFX_ChunkFileStream, and IFX_FileStream.

## ◆ GetSize()

virtual FX_INT64 IFX_FileWrite::GetSize | ( |  | ) |
| pure virtual

Get total size of the file.

Returns
  File size, in bytes. Implementation can return 0 for any error.

Implemented in CFX_CachedFileRead, IFX_ChunkFileStream, and IFX_FileStream.

## ◆ WriteBlock() [1/2]

virtual FX_BOOL IFX_FileWrite::WriteBlock | ( | const void * | pData,
|  | FX_INT64 | offset,
|  | size_t | size
| ) |  |
| pure virtual

Write a block data.

Parameters

  [in] | pData | The block data.
  [in] | offset | Byte offset from beginning of the file
  [in] | size | The length in bytes of the block data.

Returns
  true means success, while false means failure.

Implemented in CFX_CachedFileRead, IFX_ChunkFileStream, and IFX_FileStream.

## ◆ WriteBlock() [2/2]

virtual FX_BOOL IFX_FileWrite::WriteBlock | ( | const void * | pData,
|  | size_t | size
| ) |  |
| inline virtual

Write a block data to the end.

Parameters

  [in] | pData | The block data.
  [in] | size | The length in bytes of the block data.

Returns
  true means success, while false means failure.

Implements IFX_StreamWrite.

Reimplemented in IFX_ChunkFileStream, and IFX_FileStream.