7 #ifndef _FILE_CLASS_HEADER_
8 #define _FILE_CLASS_HEADER_
47 OM_ReadWrite = 0x0008,
52 OM_SharedRead = 0x0100,
57 OM_SharedWrite = 0x0200,
60 OM_SequentialAccess = 0x0400,
64 OM_TemporaryFile = 0x0800,
67 OM_ShortLived = 0x1000,
74 OM_WriteThrough = 0x4000,
77 OM_DisableFileSystemCache = 0x8000
uint8_t tUInt8
type definition for unsigned integer values (8bit) (platform and compiler independent type).
tInt64 tFileSize
type definition for a file or stream size value (platform and compiler independent type).
tInt64 tFilePos
type definition for a file or stream position value (platform and compiler independent type).
void tVoid
The tVoid is always the definition for the void (non-type).
tVoid * tHandle
type definition for a handle value (platform and compiler dependent type).
int tInt
type definition for signed integer value (platform and compiler dependent type).
bool tBool
The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).
uint32_t tUInt32
type definition for unsigned integer values (32bit) (platform and compiler independent type).
tFilePos SetFilePos(tFilePos nOffset, tFilePosRef MoveMode)
This function moves the file pointer.
tBool m_bSystemCacheDisabled
System cache disabled.
tInt m_nFileCacheSize
File cache size.
tFilePosRef
File position reference.
tResult ReadAll(tVoid *pvBuffer, tInt nBufferSize)
This function reads data into a buffer from the file associated with the cFile object.
tResult Detach()
This function detaches existing references to file objects.
static tResult GetTimeCreation(const cFilename filename, A_UTILS_NS::cDateTime &dt)
This function returns the creation time of the file.
tBool IsValid() const
This function checks if the file object has an valid file handle.
tBool IsEof()
Checks whether or not the end of the file has been reached.
tVoid Initialize()
Initialization.
tInt ReadLine(cString &strString)
This function reads a line of text data into a cString object.
tInt Write(const cString &strString)
This function writes string data from a buffer to the file associated with the cFile object.
tVoid InternalFree(tVoid *pMemory, tBool bUseSegmentSize=tFalse)
Internal free method.
tInt m_nFileCacheOffset
File cache offset.
tUInt8 * m_pReadCache
File read cache.
tFilePos m_nSectorBytesToSkip
Sector bytes that will be skipped.
tResult Open(const cFilename &strFilename, tUInt32 ui32Mode)
This function opens an existing or creates a new file.
tInt m_nFileCacheUsage
File cache usage.
static tResult GetTimeAccess(const cFilename filename, A_UTILS_NS::cDateTime &dt)
This function returns the last access time of the file.
tFileHandle m_hFile
File handle.
tResult Truncate(tFilePos nSize)
This method truncates the file at the given size.
tInt WriteLine(const cString &strString)
This function writes string data from a buffer to the file associated with the cFile object.
tBool m_bReadCacheEnabled
Read cache enabled.
tFileSize GetSize() const
This function retrieves the file size.
tInt Read(tVoid *pvBuffer, tInt nBufferSize)
This function reads data into a buffer from the file associated with the cFile object.
tInt Skip(tInt nNumberOfBytes)
This function reads data from a file but does not store it .
static tResult GetTimeChange(const cFilename filename, A_UTILS_NS::cDateTime &dt)
This function returns the last change (write) time of the file.
tBool m_bReference
File is reference.
tResult WriteAll(const tVoid *pvBuffer, tInt nBufferSize)
This function writes data from a buffer to the file associated with the cFile object.
tResult Attach(cFile &oFile)
This function attaches an existing instance of a file class to another.
tBool SetReadCache(tInt nCacheSize)
This function sets the file read cache size.
tInt Write(const tVoid *pvBuffer, tInt nBufferSize)
This function writes data from a buffer to the file associated with the cFile object.
tVoid * InternalMalloc(tInt nSize, tBool bUseSegmentSize=tFalse)
Internal allocation method.
tResult AllocReadCache(tInt nCacheSize)
Allocate read cache.
tFilePos GetFilePos() const
This function retrieves the file pointer offset.
virtual ~cFile()
Destructor. If handling an open file, the file is closed.
tInt m_nSectorSize
Sector size.
tResult FreeReadCache()
Free read cache.
tResult Close()
Close file.
A common result class usable as return value throughout.
#define tFalse
Value for tBool.
#define A_UTILS_D(__pclassname_)
Helper macro for d-pattern definitions.
ADTF A_UTIL Namespace - Within adtf this is used as adtf::util or adtf_util.
int tFileHandle
The type tFileHandle is used internally only.