Foxit PDF SDK

Classes | Macros | Functions
fx_stream.h File Reference

Header file for Streams related definitions and classes. More...

Go to the source code of this file.

## Classes
struct | FX_HFILE
| File accessing handle. More...
class | CFX_CachedFileRead
| Cached file read interface. More...
class | IFX_BufferRead
| IFX_BufferRead stream provides an optimized approach to read stream data. Usually, one stream maintains an internal buffer for data access, this buffer can be used directly to caller, and avoids data-copy. More...
class | IFX_ChunkFileStream
| Chunk-based File stream interface, reading & writing. More...
class | IFX_FileAccess
| File access interface, open file. More...
class | IFX_FileRead
| File reading interface. More...
class | IFX_FileStream
| File stream interface, reading & writing. More...
class | IFX_FileWrite
| File writing interface. More...
class | IFX_MemoryStream
| Memory stream interface. More...
class | IFX_StreamRead
| Stream reading interface. More...
class | IFX_StreamWrite
| Stream writing interface. More...

## Macros
#define | _FX_LARGEFILE_USED_
| Preprocessor for large file support.
#define | FX_FILESIZE FX_INT64
| Support large file directly.

## Functions
void | FX_CloseFolder (void *handle)
| Close folder handle. More...
FX_BOOL | FX_CreateFolder (FX_LPCSTR path)
| Create new folder. More...
FX_BOOL | FX_CreateFolder (FX_LPCWSTR path)
| Create new folder. More...
FX_BOOL | FX_DeleteFolder (FX_LPCSTR path)
| Delete folder. More...
FX_BOOL | FX_DeleteFolder (FX_LPCWSTR path)
| Delete folder. More...
FX_WCHAR | FX_GetFolderSeparator ()
| Get folder separator for the system. Most likely it's either /' or '\'. More...
FX_BOOL | FX_GetNextFile (void *handle, CFX_ByteString &filename, FX_BOOL &bFolder, FX_LPCSTR absPath=0)
| Read next entry in the folder. More...
FX_BOOL | FX_GetNextFile (void *handle, CFX_WideString &filename, FX_BOOL &bFolder, FX_LPCSTR absPath=0)
| Read next entry in the folder. More...
FX_BOOL | FX_IsFilePathExist (FX_LPCWSTR path)
| Check if the path exists, including file path and folder path. More...
void * | FX_OpenFolder (FX_LPCSTR path)
| Open a folder for reading. More...
void * | FX_OpenFolder (FX_LPCWSTR path)
| Open a folder for reading. More...

## Macro definitions for File accessing modes
IFX_FileAccess * | FX_CreateDefaultFileAccess (FX_WSTR wsPath, IFX_Allocator *pAllocator=0)
| Create a CRT based file I/O interface. More...
IFX_FileRead * | FX_CreateFileRead (FX_LPCSTR filename, IFX_Allocator *pAllocator=0)
| (Available only for platforms supporting CRT file access) Create a CRT based file reading interface. More...
IFX_FileRead * | FX_CreateFileRead (FX_LPCWSTR filename, IFX_Allocator *pAllocator=0)
| (Available only for platforms supporting CRT file access) Create a CRT based file reading interface. More...
IFX_FileStream * | FX_CreateFileStream (FX_LPCSTR filename, FX_DWORD dwModes, IFX_Allocator *pAllocator=0)
| (Available only for platforms supporting CRT file access) Create a CRT based file I/O interface. More...
IFX_FileStream * | FX_CreateFileStream (FX_LPCWSTR filename, FX_DWORD dwModes, IFX_Allocator *pAllocator=0)
| (Available only for platforms supporting CRT file access) Create a CRT based file I/O interface. More...
IFX_FileWrite * | FX_CreateFileWrite (FX_LPCSTR filename, IFX_Allocator *pAllocator=0)
| (Available only for platforms supporting CRT file access (fopen, ...)) Create a CRT based file writing interface. More...
IFX_FileWrite * | FX_CreateFileWrite (FX_LPCWSTR filename, IFX_Allocator *pAllocator=0)
| (Available only for platforms supporting CRT file access (fopen, ...)) Create a CRT based file writing interface. More...
IFX_MemoryStream * | FX_CreateMemoryStream (FX_BOOL bConsecutive=false, IFX_Allocator *pAllocator=0)
| Create a memory stream object. Memory buffer will be created internally, and the size will increase when need more space. More...
IFX_MemoryStream * | FX_CreateMemoryStream (FX_LPBYTE pBuffer, size_t nSize, FX_BOOL bTakeOver=false, IFX_Allocator *pAllocator=0)
| Creates a stream object by a given memory buffer. This function creates a consecutive memory stream object. More...
void | FX_File_Close (FX_HFILE hFile, IFX_Allocator *pAllocator=0)
| Close file. More...
FX_BOOL | FX_File_Copy (FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
| Copy file. More...
FX_BOOL | FX_File_Copy (FX_WSTR fileNameSrc, FX_WSTR fileNameDst)
| Copy file. More...
FX_BOOL | FX_File_Delete (FX_BSTR fileName)
| Delete file. More...
FX_BOOL | FX_File_Delete (FX_WSTR fileName)
| Delete file. More...
FX_BOOL | FX_File_Exist (FX_BSTR fileName)
| Determine whether a file exists or not. More...
FX_BOOL | FX_File_Exist (FX_WSTR fileName)
| Determine whether a file exists or not. More...
FX_BOOL | FX_File_Flush (FX_HFILE hFile)
| Flush internal buffer if need. More...
FX_INT64 | FX_File_GetPosition (FX_HFILE hFile)
| Get the current file accessing position. More...
FX_INT64 | FX_File_GetSize (FX_HFILE hFile)
| Get file size. More...
FX_BOOL | FX_File_Move (FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
| Move file. More...
FX_BOOL | FX_File_Move (FX_WSTR fileNameSrc, FX_WSTR fileNameDst)
| Move file. More...
FX_HFILE | FX_File_Open (FX_BSTR fileName, FX_DWORD dwMode, IFX_Allocator *pAllocator=0)
| Open file with specified accessing mode. More...
FX_HFILE | FX_File_Open (FX_WSTR fileName, FX_DWORD dwMode, IFX_Allocator *pAllocator=0)
| Open file with specified accessing mode. More...
size_t | FX_File_Read (FX_HFILE hFile, void *pBuffer, size_t szBuffer)
| Read data from the current file accessing position. More...
size_t | FX_File_ReadPos (FX_HFILE hFile, void *pBuffer, size_t szBuffer, FX_INT64 pos)
| Read data from specified position. More...
FX_INT64 | FX_File_SetPosition (FX_HFILE hFile, FX_INT64 pos)
| Set the current file accessing position. More...
FX_BOOL | FX_File_Truncate (FX_HFILE hFile, FX_INT64 szFile)
| Truncate file size. More...
size_t | FX_File_Write (FX_HFILE hFile, const void *pBuffer, size_t szBuffer)
| Write data from the current file accessing position. More...
size_t | FX_File_WritePos (FX_HFILE hFile, const void *pBuffer, size_t szBuffer, FX_INT64 pos)
| Write data at specified position. More...
#define | FX_FILECACHE_CHUNKCOUNT 64
#define | FX_FILECACHE_CHUNKSIZE 32768
#define | FX_FILEMODE_ReadOnly 1
| Read-only mode.
#define | FX_FILEMODE_Truncate 2
| Clear existing contents, and size of file is to be 0. For writing mode only.
#define | FX_FILEMODE_Write 0
| Write mode. To create automatically if the file doesn't exist.

## Detailed Description

Header file for Streams related definitions and classes.

Copyright (C) 2003-2026, Foxit Software Inc.. All Rights Reserved.

http://www.foxitsoftware.com

The following code is copyrighted and is the proprietary of Foxit Software Inc.. It is not allowed to distribute any parts of Foxit PDF SDK to third party or public without permission unless an agreement is signed between Foxit Software Inc. and customers to explicitly grant customers permissions.