Data Structures | Defines | Typedefs | Functions

OrxFile

Data Structures

struct  orxFILE_INFO

Defines

#define orxFILE_KU32_FLAG_INFO_DIR   0x00000008
#define orxFILE_KU32_FLAG_INFO_HIDDEN   0x00000004
#define orxFILE_KU32_FLAG_INFO_NORMAL   0x00000001
#define orxFILE_KU32_FLAG_INFO_RDONLY   0x00000002
#define orxFILE_KU32_FLAG_OPEN_APPEND   0x00000004
#define orxFILE_KU32_FLAG_OPEN_BINARY   0x00000008
#define orxFILE_KU32_FLAG_OPEN_READ   0x00000001
#define orxFILE_KU32_FLAG_OPEN_WRITE   0x00000002

Typedefs

typedef struct __orxFILE_t orxFILE

Functions

orxDLLAPI orxSTATUS orxFASTCALL orxFile_Close (orxFILE *_pstFile)
orxDLLAPI orxBOOL orxFASTCALL orxFile_Exists (const orxSTRING _zFileName)
orxDLLAPI void orxFASTCALL orxFile_Exit ()
orxDLLAPI void orxFASTCALL orxFile_FindClose (orxFILE_INFO *_pstFileInfo)
orxDLLAPI orxBOOL orxFASTCALL orxFile_FindFirst (const orxSTRING _zSearchPattern, orxFILE_INFO *_pstFileInfo)
orxDLLAPI orxBOOL orxFASTCALL orxFile_FindNext (orxFILE_INFO *_pstFileInfo)
orxDLLAPI orxSTATUS orxFASTCALL orxFile_GetInfo (const orxSTRING _zFileName, orxFILE_INFO *_pstFileInfo)
orxDLLAPI orxS32 orxFASTCALL orxFile_GetSize (const orxFILE *_pstFile)
orxDLLAPI orxSTATUS orxFASTCALL orxFile_Init ()
orxDLLAPI orxFILE *orxFASTCALL orxFile_Open (const orxSTRING _zFileName, orxU32 _u32OpenFlags)
orxDLLAPI orxS32 orxCDECL orxFile_Print (orxFILE *_pstFile, orxSTRING _zString,...)
orxDLLAPI orxU32 orxFASTCALL orxFile_Read (void *_pReadData, orxU32 _u32ElemSize, orxU32 _u32NbElem, orxFILE *_pstFile)
orxDLLAPI orxSTATUS orxFASTCALL orxFile_Seek (orxFILE *_pstFile, orxS32 _s32Position)
orxDLLAPI void orxFASTCALL orxFile_Setup ()
orxDLLAPI orxS32 orxFASTCALL orxFile_Tell (const orxFILE *_pstFile)
orxDLLAPI orxU32 orxFASTCALL orxFile_Write (void *_pDataToWrite, orxU32 _u32ElemSize, orxU32 _u32NbElem, orxFILE *_pstFile)

Detailed Description

File / file system module Module that handles file / file system access


Define Documentation

#define orxFILE_KU32_FLAG_INFO_DIR   0x00000008

directory

Definition at line 52 of file orxFile.h.

#define orxFILE_KU32_FLAG_INFO_HIDDEN   0x00000004

hidden file

Definition at line 51 of file orxFile.h.

#define orxFILE_KU32_FLAG_INFO_NORMAL   0x00000001

normal file

Definition at line 49 of file orxFile.h.

#define orxFILE_KU32_FLAG_INFO_RDONLY   0x00000002

read-only file

Definition at line 50 of file orxFile.h.

#define orxFILE_KU32_FLAG_OPEN_APPEND   0x00000004

descriptor positioned at the end of file

Definition at line 56 of file orxFile.h.

#define orxFILE_KU32_FLAG_OPEN_BINARY   0x00000008

binary file accessing

Definition at line 57 of file orxFile.h.

#define orxFILE_KU32_FLAG_OPEN_READ   0x00000001

opened for read

Definition at line 54 of file orxFile.h.

#define orxFILE_KU32_FLAG_OPEN_WRITE   0x00000002

opened for write

Definition at line 55 of file orxFile.h.


Typedef Documentation

typedef struct __orxFILE_t orxFILE

Internal File structure

Definition at line 77 of file orxFile.h.


Function Documentation

orxDLLAPI orxSTATUS orxFASTCALL orxFile_Close ( orxFILE _pstFile )

Closes an oppened file

Parameters:
[in]_pstFileFile's pointer to close
Returns:
Returns the status of the operation
orxDLLAPI orxBOOL orxFASTCALL orxFile_Exists ( const orxSTRING  _zFileName )

Returns orxTRUE if a file exists, else orxFALSE.

Parameters:
[in]_zFileNameFull File's name to test
Returns:
orxFALSE if _zFileName doesn't exist, else orxTRUE
orxDLLAPI void orxFASTCALL orxFile_Exit (  )

Exits from the File Module

orxDLLAPI void orxFASTCALL orxFile_FindClose ( orxFILE_INFO _pstFileInfo )

Closes a search (free the memory allocated for this search).

Parameters:
[in]_pstFileInfoInformations returned during search
orxDLLAPI orxBOOL orxFASTCALL orxFile_FindFirst ( const orxSTRING  _zSearchPattern,
orxFILE_INFO _pstFileInfo 
)

Starts a new search. Find the first file that will match to the given pattern (e.g : /bin/toto* or c:\*.*)

Parameters:
[in]_zSearchPatternPattern to find
[out]_pstFileInfoInformations about the first file found
Returns:
orxTRUE if a file has been found, else orxFALSE
orxDLLAPI orxBOOL orxFASTCALL orxFile_FindNext ( orxFILE_INFO _pstFileInfo )

Continues a search. Find the next occurence of a pattern. The search has to be started with orxFile_FindFirst

Parameters:
[in,out]_pstFileInfo(IN/OUT) Informations about the found file
Returns:
orxTRUE, if the next file has been found, else returns orxFALSE
orxDLLAPI orxSTATUS orxFASTCALL orxFile_GetInfo ( const orxSTRING  _zFileName,
orxFILE_INFO _pstFileInfo 
)

Retrieves information about a file

Parameters:
[in]_zFileNameFiles used to get information
[out]_pstFileInfoReturned file's information
Returns:
Returns the status of the operation
orxDLLAPI orxS32 orxFASTCALL orxFile_GetSize ( const orxFILE _pstFile )

Retrieves a file's size

Parameters:
[in]_pstFileConcerned file
Returns:
Returns the length of the file, <= 0 if invalid
orxDLLAPI orxSTATUS orxFASTCALL orxFile_Init (  )

Inits the File Module

orxDLLAPI orxFILE* orxFASTCALL orxFile_Open ( const orxSTRING  _zFileName,
orxU32  _u32OpenFlags 
)

Opens a file for later read or write operation

Parameters:
[in]_zFileNameFull file's path to open
[in]_u32OpenFlagsList of used flags when opened
Returns:
a File pointer (or orxNULL if an error has occured)
orxDLLAPI orxS32 orxCDECL orxFile_Print ( orxFILE _pstFile,
orxSTRING  _zString,
  ... 
)

Prints a formatted string to a file

Parameters:
[in]_pstFilePointer on the file descriptor
[in]_zStringFormatted string
Returns:
Returns the number of written characters
orxDLLAPI orxU32 orxFASTCALL orxFile_Read ( void *  _pReadData,
orxU32  _u32ElemSize,
orxU32  _u32NbElem,
orxFILE _pstFile 
)

Reads data from a file

Parameters:
[out]_pReadDataPointer where will be stored datas
[in]_u32ElemSizeSize of 1 element
[in]_u32NbElemNumber of elements
[in]_pstFilePointer on the file descriptor
Returns:
Returns the number of read elements (not bytes)
orxDLLAPI orxSTATUS orxFASTCALL orxFile_Seek ( orxFILE _pstFile,
orxS32  _s32Position 
)

Seeks to a position in the given file

Parameters:
[in]_pstFileConcerned file
[in]_s32PositionPosition (from start) where to set the indicator
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxFile_Setup (  )

File module setup

orxDLLAPI orxS32 orxFASTCALL orxFile_Tell ( const orxFILE _pstFile )

Tells the current position of the indicator in a file

Parameters:
[in]_pstFileConcerned file
Returns:
Returns the current position of the file indicator, -1 is invalid
orxDLLAPI orxU32 orxFASTCALL orxFile_Write ( void *  _pDataToWrite,
orxU32  _u32ElemSize,
orxU32  _u32NbElem,
orxFILE _pstFile 
)

writes data to a file

Parameters:
[in]_pDataToWritePointer where will be stored datas
[in]_u32ElemSizeSize of 1 element
[in]_u32NbElemNumber of elements
[in]_pstFilePointer on the file descriptor
Returns:
Returns the number of written elements (not bytes)

Generated for orx by doxygen 1.5.6