orx  stable
Portable Game Engine
orxFile.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2017 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 
43 #ifndef _orxFILE_H_
44 #define _orxFILE_H_
45 
46 #include "orxInclude.h"
47 
48 
49 #define orxFILE_KU32_FLAG_INFO_NORMAL 0x00000001
50 #define orxFILE_KU32_FLAG_INFO_READONLY 0x00000002
51 #define orxFILE_KU32_FLAG_INFO_HIDDEN 0x00000004
52 #define orxFILE_KU32_FLAG_INFO_DIRECTORY 0x00000008
54 #define orxFILE_KU32_FLAG_OPEN_READ 0x10000000
55 #define orxFILE_KU32_FLAG_OPEN_WRITE 0x20000000
56 #define orxFILE_KU32_FLAG_OPEN_APPEND 0x40000000
57 #define orxFILE_KU32_FLAG_OPEN_BINARY 0x80000000
61 typedef struct __orxFILE_INFO_t
62 {
63  orxS64 s64Size;
64  orxS64 s64TimeStamp;
65  orxU32 u32Flags;
66  orxHANDLE hInternal;
67  orxCHAR zName[256];
68  orxCHAR zPattern[256];
69  orxCHAR zPath[1024];
70  orxCHAR zFullName[1280];
72 } orxFILE_INFO;
73 
74 
77 typedef struct __orxFILE_t orxFILE;
78 
79 
81 extern orxDLLAPI void orxFASTCALL orxFile_Setup();
82 
85 extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_Init();
86 
89 extern orxDLLAPI void orxFASTCALL orxFile_Exit();
90 
95 extern orxDLLAPI const orxSTRING orxFASTCALL orxFile_GetHomeDirectory(const orxSTRING _zSubPath);
96 
101 extern orxDLLAPI const orxSTRING orxFASTCALL orxFile_GetApplicationSaveDirectory(const orxSTRING _zSubPath);
102 
107 extern orxDLLAPI orxBOOL orxFASTCALL orxFile_Exists(const orxSTRING _zFileName);
108 
114 extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_FindFirst(const orxSTRING _zSearchPattern, orxFILE_INFO *_pstFileInfo);
115 
120 extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_FindNext(orxFILE_INFO *_pstFileInfo);
121 
125 extern orxDLLAPI void orxFASTCALL orxFile_FindClose(orxFILE_INFO *_pstFileInfo);
126 
132 extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_GetInfo(const orxSTRING _zFileName, orxFILE_INFO *_pstFileInfo);
133 
138 extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_Remove(const orxSTRING _zFileName);
139 
144 extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_MakeDirectory(const orxSTRING _zName);
145 
151 extern orxDLLAPI orxFILE *orxFASTCALL orxFile_Open(const orxSTRING _zFileName, orxU32 _u32OpenFlags);
152 
160 extern orxDLLAPI orxS64 orxFASTCALL orxFile_Read(void *_pReadData, orxS64 _s64ElemSize, orxS64 _s64NbElem, orxFILE *_pstFile);
161 
169 extern orxDLLAPI orxS64 orxFASTCALL orxFile_Write(const void *_pDataToWrite, orxS64 _s64ElemSize, orxS64 _s64NbElem, orxFILE *_pstFile);
170 
177 extern orxDLLAPI orxS64 orxFASTCALL orxFile_Seek(orxFILE *_pstFile, orxS64 _s64Position, orxSEEK_OFFSET_WHENCE _eWhence);
178 
183 extern orxDLLAPI orxS64 orxFASTCALL orxFile_Tell(const orxFILE *_pstFile);
184 
189 extern orxDLLAPI orxS64 orxFASTCALL orxFile_GetSize(const orxFILE *_pstFile);
190 
195 extern orxDLLAPI orxS64 orxFASTCALL orxFile_GetTime(const orxFILE *_pstFile);
196 
202 extern orxDLLAPI orxS32 orxCDECL orxFile_Print(orxFILE *_pstFile, const orxSTRING _zString, ...);
203 
208 extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_Close(orxFILE *_pstFile);
209 
210 #endif /* _orxFILE_H_ */
211 
orxS64 s64TimeStamp
Definition: orxFile.h:64
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 void orxFASTCALL orxFile_Exit()
orxDLLAPI orxSTATUS orxFASTCALL orxFile_FindFirst(const orxSTRING _zSearchPattern, orxFILE_INFO *_pstFileInfo)
orxHANDLE hInternal
Definition: orxFile.h:66
orxDLLAPI orxSTATUS orxFASTCALL orxFile_MakeDirectory(const orxSTRING _zName)
orxDLLAPI const orxSTRING orxFASTCALL orxFile_GetHomeDirectory(const orxSTRING _zSubPath)
orxS64 s64Size
Definition: orxFile.h:63
orxDLLAPI orxS64 orxFASTCALL orxFile_Seek(orxFILE *_pstFile, orxS64 _s64Position, orxSEEK_OFFSET_WHENCE _eWhence)
orxDLLAPI orxSTATUS orxFASTCALL orxFile_GetInfo(const orxSTRING _zFileName, orxFILE_INFO *_pstFileInfo)
orxDLLAPI orxFILE *orxFASTCALL orxFile_Open(const orxSTRING _zFileName, orxU32 _u32OpenFlags)
orxDLLAPI orxBOOL orxFASTCALL orxFile_Exists(const orxSTRING _zFileName)
orxU32 u32Flags
Definition: orxFile.h:65
orxDLLAPI orxSTATUS orxFASTCALL orxFile_FindNext(orxFILE_INFO *_pstFileInfo)
orxDLLAPI orxSTATUS orxFASTCALL orxFile_Close(orxFILE *_pstFile)
orxSTATUS
Definition: orxType.h:243
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:171
#define orxDLLAPI
Definition: orxDecl.h:387
orxDLLAPI orxSTATUS orxFASTCALL orxFile_Init()
struct __orxFILE_t orxFILE
Definition: orxFile.h:77
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.5.6