orx  1.14
Portable Game Engine
orxFile.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2022 Orx-Project
4  *
5  * This software is provided 'as-is', without any express or implied
6  * warranty. In no event will the authors be held liable for any damages
7  * arising from the use of this software.
8  *
9  * Permission is granted to anyone to use this software for any purpose,
10  * including commercial applications, and to alter it and redistribute it
11  * freely, subject to the following restrictions:
12  *
13  * 1. The origin of this software must not be misrepresented; you must not
14  * claim that you wrote the original software. If you use this software
15  * in a product, an acknowledgment in the product documentation would be
16  * appreciated but is not required.
17  *
18  * 2. Altered source versions must be plainly marked as such, and must not be
19  * misrepresented as being the original software.
20  *
21  * 3. This notice may not be removed or altered from any source
22  * distribution.
23  */
24 
44 #ifndef _orxFILE_H_
45 #define _orxFILE_H_
46 
47 #include "orxInclude.h"
48 
49 
50 #define orxFILE_KU32_FLAG_INFO_NORMAL 0x00000001
51 #define orxFILE_KU32_FLAG_INFO_READONLY 0x00000002
52 #define orxFILE_KU32_FLAG_INFO_HIDDEN 0x00000004
53 #define orxFILE_KU32_FLAG_INFO_DIRECTORY 0x00000008
55 #define orxFILE_KU32_FLAG_OPEN_READ 0x10000000
56 #define orxFILE_KU32_FLAG_OPEN_WRITE 0x20000000
57 #define orxFILE_KU32_FLAG_OPEN_APPEND 0x40000000
58 #define orxFILE_KU32_FLAG_OPEN_BINARY 0x80000000
62 typedef struct __orxFILE_INFO_t
63 {
64  orxS64 s64Size;
65  orxS64 s64TimeStamp;
66  orxU32 u32Flags;
68  orxCHAR zName[256];
69  orxCHAR zPattern[256];
70  orxCHAR zPath[1024];
71  orxCHAR zFullName[1280];
73 } orxFILE_INFO;
74 
75 
78 typedef struct __orxFILE_t orxFILE;
79 
80 
82 extern orxDLLAPI void orxFASTCALL orxFile_Setup();
83 
86 extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_Init();
87 
90 extern orxDLLAPI void orxFASTCALL orxFile_Exit();
91 
96 extern orxDLLAPI const orxSTRING orxFASTCALL orxFile_GetHomeDirectory(const orxSTRING _zSubPath);
97 
102 extern orxDLLAPI const orxSTRING orxFASTCALL orxFile_GetApplicationSaveDirectory(const orxSTRING _zSubPath);
103 
108 extern orxDLLAPI orxBOOL orxFASTCALL orxFile_Exists(const orxSTRING _zFileName);
109 
115 extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_FindFirst(const orxSTRING _zSearchPattern, orxFILE_INFO *_pstFileInfo);
116 
121 extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_FindNext(orxFILE_INFO *_pstFileInfo);
122 
126 extern orxDLLAPI void orxFASTCALL orxFile_FindClose(orxFILE_INFO *_pstFileInfo);
127 
133 extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_GetInfo(const orxSTRING _zFileName, orxFILE_INFO *_pstFileInfo);
134 
139 extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_Remove(const orxSTRING _zFileName);
140 
145 extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_MakeDirectory(const orxSTRING _zName);
146 
152 extern orxDLLAPI orxFILE *orxFASTCALL orxFile_Open(const orxSTRING _zFileName, orxU32 _u32OpenFlags);
153 
161 extern orxDLLAPI orxS64 orxFASTCALL orxFile_Read(void *_pReadData, orxS64 _s64ElemSize, orxS64 _s64NbElem, orxFILE *_pstFile);
162 
170 extern orxDLLAPI orxS64 orxFASTCALL orxFile_Write(const void *_pDataToWrite, orxS64 _s64ElemSize, orxS64 _s64NbElem, orxFILE *_pstFile);
171 
176 extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_Delete(const orxSTRING _zFileName);
177 
184 extern orxDLLAPI orxS64 orxFASTCALL orxFile_Seek(orxFILE *_pstFile, orxS64 _s64Position, orxSEEK_OFFSET_WHENCE _eWhence);
185 
190 extern orxDLLAPI orxS64 orxFASTCALL orxFile_Tell(const orxFILE *_pstFile);
191 
196 extern orxDLLAPI orxS64 orxFASTCALL orxFile_GetSize(const orxFILE *_pstFile);
197 
202 extern orxDLLAPI orxS64 orxFASTCALL orxFile_GetTime(const orxFILE *_pstFile);
203 
209 extern orxDLLAPI orxS32 orxCDECL orxFile_Print(orxFILE *_pstFile, const orxSTRING _zString, ...);
210 
215 extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_Close(orxFILE *_pstFile);
216 
217 #endif /* _orxFILE_H_ */
218 
orxS64 s64TimeStamp
Definition: orxFile.h:65
orxDLLAPI orxS64 orxFASTCALL orxFile_Read(void *_pReadData, orxS64 _s64ElemSize, orxS64 _s64NbElem, orxFILE *_pstFile)
orxDLLAPI orxS64 orxFASTCALL orxFile_GetTime(const orxFILE *_pstFile)
orxDLLAPI orxS32 orxCDECL orxFile_Print(orxFILE *_pstFile, const orxSTRING _zString,...)
orxDLLAPI orxSTATUS orxFASTCALL orxFile_Delete(const orxSTRING _zFileName)
orxDLLAPI void orxFASTCALL orxFile_Exit()
orxDLLAPI orxSTATUS orxFASTCALL orxFile_FindFirst(const orxSTRING _zSearchPattern, orxFILE_INFO *_pstFileInfo)
orxHANDLE hInternal
Definition: orxFile.h:67
orxDLLAPI orxSTATUS orxFASTCALL orxFile_MakeDirectory(const orxSTRING _zName)
orxDLLAPI const orxSTRING orxFASTCALL orxFile_GetHomeDirectory(const orxSTRING _zSubPath)
orxS64 s64Size
Definition: orxFile.h:64
orxDLLAPI orxS64 orxFASTCALL orxFile_Seek(orxFILE *_pstFile, orxS64 _s64Position, orxSEEK_OFFSET_WHENCE _eWhence)
orxDLLAPI orxSTATUS orxFASTCALL orxFile_GetInfo(const orxSTRING _zFileName, orxFILE_INFO *_pstFileInfo)
void * orxHANDLE
Definition: orxType.h:166
orxDLLAPI orxFILE *orxFASTCALL orxFile_Open(const orxSTRING _zFileName, orxU32 _u32OpenFlags)
orxDLLAPI orxBOOL orxFASTCALL orxFile_Exists(const orxSTRING _zFileName)
orxU32 u32Flags
Definition: orxFile.h:66
orxDLLAPI orxSTATUS orxFASTCALL orxFile_FindNext(orxFILE_INFO *_pstFileInfo)
orxDLLAPI orxSTATUS orxFASTCALL orxFile_Close(orxFILE *_pstFile)
orxSTATUS
Definition: orxType.h:256
orxDLLAPI void orxFASTCALL orxFile_Setup()
orxDLLAPI orxS64 orxFASTCALL orxFile_Write(const void *_pDataToWrite, orxS64 _s64ElemSize, orxS64 _s64NbElem, orxFILE *_pstFile)
orxDLLAPI orxSTATUS orxFASTCALL orxFile_Remove(const orxSTRING _zFileName)
orxSEEK_OFFSET_WHENCE
Definition: orxType.h:183
#define orxDLLAPI
Definition: orxDecl.h:370
orxDLLAPI orxSTATUS orxFASTCALL orxFile_Init()
struct __orxFILE_t orxFILE
Definition: orxFile.h:78
orxDLLAPI orxS64 orxFASTCALL orxFile_GetSize(const orxFILE *_pstFile)
orxDLLAPI void orxFASTCALL orxFile_FindClose(orxFILE_INFO *_pstFileInfo)
orxDLLAPI const orxSTRING orxFASTCALL orxFile_GetApplicationSaveDirectory(const orxSTRING _zSubPath)
orxDLLAPI orxS64 orxFASTCALL orxFile_Tell(const orxFILE *_pstFile)

Generated for orx by doxygen 1.8.11