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_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.
 
Macro definitions for File accessing modes
#define FX_FILEMODE_Write   0
 Write mode. To create automatically if the file doesn't exist.
 
#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.
 

Functions

void FX_CloseFolder (void *handle)
 Close folder handle. More...
 
IFX_FileAccessFX_CreateDefaultFileAccess (FX_WSTR wsPath, IFX_Allocator *pAllocator=0)
 Create a CRT based file I/O interface. More...
 
IFX_FileReadFX_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_FileReadFX_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_FileStreamFX_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_FileStreamFX_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_FileWriteFX_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_FileWriteFX_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...
 
FX_BOOL FX_CreateFolder (FX_LPCSTR path)
 Create new folder. More...
 
FX_BOOL FX_CreateFolder (FX_LPCWSTR path)
 Create new folder. More...
 
IFX_MemoryStreamFX_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...
 
IFX_MemoryStreamFX_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...
 
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...
 
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...
 

Detailed Description

Header file for Streams related definitions and classes.

Copyright (C) 2003-2019, 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.

Foxit Software Corporation Logo
@2019 Foxit Software Incorporated. All rights reserved.