orx 1.16
Portable Game Engine
Loading...
Searching...
No Matches
orxFile.h
Go to the documentation of this file.
1/* Orx - Portable Game Engine
2 *
3 * Copyright (c) 2008- 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
33
42
43
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
54
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
59
60
62typedef 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];
72
74
75
78typedef struct __orxFILE_t orxFILE;
79
80
82extern orxDLLAPI void orxFASTCALL orxFile_Setup();
83
86extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_Init();
87
90extern orxDLLAPI void orxFASTCALL orxFile_Exit();
91
96extern orxDLLAPI const orxSTRING orxFASTCALL orxFile_GetHomeDirectory(const orxSTRING _zSubPath);
97
102extern orxDLLAPI const orxSTRING orxFASTCALL orxFile_GetApplicationSaveDirectory(const orxSTRING _zSubPath);
103
108extern orxDLLAPI orxBOOL orxFASTCALL orxFile_Exists(const orxSTRING _zFileName);
109
115extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_FindFirst(const orxSTRING _zSearchPattern, orxFILE_INFO *_pstFileInfo);
116
121extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_FindNext(orxFILE_INFO *_pstFileInfo);
122
126extern orxDLLAPI void orxFASTCALL orxFile_FindClose(orxFILE_INFO *_pstFileInfo);
127
133extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_GetInfo(const orxSTRING _zFileName, orxFILE_INFO *_pstFileInfo);
134
139extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_MakeDirectory(const orxSTRING _zName);
140
146extern orxDLLAPI orxFILE *orxFASTCALL orxFile_Open(const orxSTRING _zFileName, orxU32 _u32Flags);
147
155extern orxDLLAPI orxS64 orxFASTCALL orxFile_Read(void *_pBuffer, orxS64 _s64ElemSize, orxS64 _s64NbElem, orxFILE *_pstFile);
156
164extern orxDLLAPI orxS64 orxFASTCALL orxFile_Write(const void *_pBuffer, orxS64 _s64ElemSize, orxS64 _s64NbElem, orxFILE *_pstFile);
165
170extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_Delete(const orxSTRING _zFileName);
171
178extern orxDLLAPI orxS64 orxFASTCALL orxFile_Seek(orxFILE *_pstFile, orxS64 _s64Position, orxSEEK_OFFSET_WHENCE _eWhence);
179
184extern orxDLLAPI orxS64 orxFASTCALL orxFile_Tell(const orxFILE *_pstFile);
185
190extern orxDLLAPI orxS64 orxFASTCALL orxFile_GetSize(const orxFILE *_pstFile);
191
196extern orxDLLAPI orxS64 orxFASTCALL orxFile_GetTime(const orxFILE *_pstFile);
197
203extern orxDLLAPI orxS32 orxCDECL orxFile_Print(orxFILE *_pstFile, const orxSTRING _zString, ...);
204
209extern orxDLLAPI orxSTATUS orxFASTCALL orxFile_Close(orxFILE *_pstFile);
210
211#endif /* _orxFILE_H_ */
212
#define orxDLLAPI
Definition orxDecl.h:381
orxDLLAPI orxS64 orxFASTCALL orxFile_Read(void *_pBuffer, orxS64 _s64ElemSize, orxS64 _s64NbElem, orxFILE *_pstFile)
orxDLLAPI void orxFASTCALL orxFile_Exit()
orxDLLAPI orxFILE *orxFASTCALL orxFile_Open(const orxSTRING _zFileName, orxU32 _u32Flags)
orxDLLAPI void orxFASTCALL orxFile_Setup()
orxDLLAPI orxSTATUS orxFASTCALL orxFile_Delete(const orxSTRING _zFileName)
struct __orxFILE_t orxFILE
Definition orxFile.h:78
orxDLLAPI orxSTATUS orxFASTCALL orxFile_Init()
orxDLLAPI const orxSTRING orxFASTCALL orxFile_GetHomeDirectory(const orxSTRING _zSubPath)
orxDLLAPI orxBOOL orxFASTCALL orxFile_Exists(const orxSTRING _zFileName)
orxDLLAPI orxS64 orxFASTCALL orxFile_GetSize(const orxFILE *_pstFile)
orxDLLAPI orxSTATUS orxFASTCALL orxFile_Close(orxFILE *_pstFile)
orxDLLAPI orxS64 orxFASTCALL orxFile_GetTime(const orxFILE *_pstFile)
orxDLLAPI orxS32 orxCDECL orxFile_Print(orxFILE *_pstFile, const orxSTRING _zString,...)
orxDLLAPI orxSTATUS orxFASTCALL orxFile_MakeDirectory(const orxSTRING _zName)
orxDLLAPI orxSTATUS orxFASTCALL orxFile_FindNext(orxFILE_INFO *_pstFileInfo)
orxDLLAPI const orxSTRING orxFASTCALL orxFile_GetApplicationSaveDirectory(const orxSTRING _zSubPath)
orxDLLAPI orxS64 orxFASTCALL orxFile_Write(const void *_pBuffer, orxS64 _s64ElemSize, orxS64 _s64NbElem, orxFILE *_pstFile)
orxDLLAPI orxSTATUS orxFASTCALL orxFile_GetInfo(const orxSTRING _zFileName, orxFILE_INFO *_pstFileInfo)
orxDLLAPI orxSTATUS orxFASTCALL orxFile_FindFirst(const orxSTRING _zSearchPattern, orxFILE_INFO *_pstFileInfo)
orxDLLAPI orxS64 orxFASTCALL orxFile_Seek(orxFILE *_pstFile, orxS64 _s64Position, orxSEEK_OFFSET_WHENCE _eWhence)
orxDLLAPI orxS64 orxFASTCALL orxFile_Tell(const orxFILE *_pstFile)
orxDLLAPI void orxFASTCALL orxFile_FindClose(orxFILE_INFO *_pstFileInfo)
orxSEEK_OFFSET_WHENCE
Definition orxType.h:184
void * orxHANDLE
Definition orxType.h:166
orxSTATUS
Definition orxType.h:270
orxU32 u32Flags
Definition orxFile.h:66
orxCHAR zFullName[1280]
Definition orxFile.h:71
orxS64 s64Size
Definition orxFile.h:64
orxCHAR zPath[1024]
Definition orxFile.h:70
orxCHAR zPattern[256]
Definition orxFile.h:69
orxS64 s64TimeStamp
Definition orxFile.h:65
orxHANDLE hInternal
Definition orxFile.h:67
orxCHAR zName[256]
Definition orxFile.h:68

Generated for orx by doxygen 1.8.11