#include <oscl_file_io.h>
Inheritance diagram for Oscl_File:
Public Types | |
enum | seek_type { SEEKSET, SEEKCUR, SEEKEND } |
enum | mode_type { MODE_READ = 0x0001, MODE_READWRITE = 0x0002, MODE_APPEND = 0x0004, MODE_BINARY = 0x0008, MODE_TEXT = 0x0010, MODE_READ_PLUS = 0x0020 } |
enum | TSymbianAccessMode { ESymbianAccessMode_Rfile = 0, ESymbianAccessMode_RfileBuf = 1 } |
Public Methods | |
OSCL_IMPORT_REF | Oscl_File () |
OSCL_IMPORT_REF | Oscl_File (uint32 aCacheSize) |
OSCL_IMPORT_REF | Oscl_File (uint32 aCacheSize, OsclFileHandle *aFileHandle) |
OSCL_IMPORT_REF | ~Oscl_File () |
OSCL_IMPORT_REF void | SetPVCacheSize (uint32 aSize) |
OSCL_IMPORT_REF void | SetNativeAccessMode (uint32 aMode) |
OSCL_IMPORT_REF void | SetNativeBufferSize (int32 aSize) |
OSCL_IMPORT_REF void | SetAsyncReadBufferSize (uint32 aSize) |
OSCL_IMPORT_REF int32 | SetFileHandle (OsclFileHandle *aHandle) |
OSCL_IMPORT_REF int32 | Open (const char *filename, uint32 mode, Oscl_FileServer &fileserv) |
OSCL_IMPORT_REF int32 | Open (const oscl_wchar *filename, uint32 mode, Oscl_FileServer &fileserv) |
OSCL_IMPORT_REF uint32 | Read (OsclAny *buffer, uint32 size, uint32 numelements) |
OSCL_IMPORT_REF uint32 | Write (const OsclAny *buffer, uint32 size, uint32 numelements) |
OSCL_IMPORT_REF int32 | Seek (TOsclFileOffset offset, seek_type origin) |
OSCL_IMPORT_REF TOsclFileOffset | Tell () |
OSCL_IMPORT_REF int32 | Close () |
OSCL_IMPORT_REF int32 | Flush () |
OSCL_IMPORT_REF int32 | EndOfFile () |
OSCL_IMPORT_REF int32 | GetError () |
OsclFileHandle * | Handle () |
OSCL_IMPORT_REF TOsclFileOffset | Size () |
OSCL_IMPORT_REF void | SetLoggingEnable (bool aEnable) |
OSCL_IMPORT_REF void | SetSummaryStatsLoggingEnable (bool aEnable) |
Friends | |
class | OsclFileCache |
class | asyncfilereadwrite_test |
class | largeasyncfilereadwrite_test |
class | asyncfilereadcancel_test |
|
|
|
|
Defines mode options for SetNativeAccessMode on Symbian. |
|
Constructor |
|
Deprecated Constructor, present for back-compatibility.
|
|
Deprecated Constructor, present for back-compatibility.
|
|
Destructor |
|
The File Close operation Closes the file after flushing any remaining data in the buffers. Note: If the file object was opened with an external file handle, then Close will simply flush the file. The file will remain open.
|
|
The File EOF(end of file) operation returns a nonzero value after the first read operation that attempts to read past the end of the file
|
|
The File Flush operation On an output stream OSCL_FileFlush causes any buffered but unwritten data to be written to the file.
|
|
The File Error operation If no error has occurred on stream, returns 0. Otherwise, it returns a nonzero value
|
|
Retrieve the file handle.
|
|
Opens a file. Note: when an external file handle is used, Open will attach to the file handle and initialize cacheing features, but will not do a native file open.
|
|
Opens a file. Note: when an external file handle is used, Open will attach to the file handle and initialize cacheing features, but will not do a native file open.
|
|
The File Read operation Reads from the file into the buffer a maximum of 'numelements' of size 'size'.
|
|
The File Seek operation Sets the position for file pointer
|
|
SetAsyncReadBufferSize configures the asynchronous background read function. May not be available on all platforms. This should be called before opening the file. If used when the file is open, the option will not take effect until the next Open. Note: if asynchronous read is not available on the platform, this call will have no effect.
|
|
SetFileHandle adds an open file handle to the Oscl_File object. The Oscl_File object will use that handle to access the file. This call is not available when the Oscl_File object is already open. Note: This feature is used in Symbian with the MMF framework. The MMF framework provides an open RFile handle to access content. When using RFileBuf access mode with an RFile handle, the RFileBuf will be attached to the open RFile handle. To use the external file handle, the caller starts with a native file handle to an open file. The caller must wrap the native file handle in an OsclFileHandle object, pass the OsclFileHandle pointer to SetFileHandle, call Oscl_File::Open, then proceed to use the Oscl_File object, finally calling Oscl_File::Close. In this usage mode, Oscl_File::Open and Oscl_File::Close do not actually call native file open and close. It is assumed that the caller will close the original native file handle after usage is complete.
|
|
SetLoggingEnable configures the PVLogger output for this file. This will enable full logging of each API entry and exit using the logger object "Oscl_File", plus full logging of native operation entry & exit using logger object "OsclNativeFile".
|
|
SetNativeAccessMode allows switching between different native file access modes, when available. Note: for For Symbian, use the TSymbianAccessMode values to choose the mode. If multiple access modes are not available on the platform, this call will have no effect.
|
|
SetNativeBufferSize configures the native file buffering feature, when available. This should be called before opening the file. If used when the file is open, the option will not take effect until the next Open. Note: For Symbian, this sets the RFileBuf cache size. If native buffing is not available on the platform, this call will have no effect.
|
|
SetPVCacheSize configures the read/write cache. This should be called before opening the file. If used when the file is open, the option will not take effect until the next Open.
|
|
SetSummaryStatsLoggingEnable configures the PVLogger output for this file. This will enable summary statistics logging only, using the logger object "OsclFileStats".
|
|
Get the file size in bytes.
|
|
The File Tell operation Returns the current file position for file specified by fp |
|
The File Write operation Writes from the buffer 'numelements' objects of size 'size'
|
|
|
|
|
|
|
|
|