| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | #ifndef _WIZARDSTOOLKIT_FILE_H_ |
|---|
| 19 | #define _WIZARDSTOOLKIT_FILE_H_ |
|---|
| 20 | |
|---|
| 21 | #if defined(__cplusplus) || defined(c_plusplus) |
|---|
| 22 | extern "C" { |
|---|
| 23 | #endif |
|---|
| 24 | |
|---|
| 25 | #include "wizard/exception.h" |
|---|
| 26 | |
|---|
| 27 | typedef enum |
|---|
| 28 | { |
|---|
| 29 | ReadFileMode, |
|---|
| 30 | WriteFileMode, |
|---|
| 31 | } FileMode; |
|---|
| 32 | |
|---|
| 33 | typedef struct _FileInfo |
|---|
| 34 | FileInfo; |
|---|
| 35 | |
|---|
| 36 | extern WizardExport const char |
|---|
| 37 | *GetFilePath(const FileInfo *); |
|---|
| 38 | |
|---|
| 39 | extern WizardExport const struct stat |
|---|
| 40 | *GetFileProperties(const FileInfo *); |
|---|
| 41 | |
|---|
| 42 | extern WizardExport FileInfo |
|---|
| 43 | *AcquireFileInfo(const char *,const char *,const FileMode mode, |
|---|
| 44 | ExceptionInfo *), |
|---|
| 45 | *DestroyFileInfo(FileInfo *,ExceptionInfo *); |
|---|
| 46 | |
|---|
| 47 | extern WizardExport int |
|---|
| 48 | GetFileDescriptor(const FileInfo *), |
|---|
| 49 | ReadFileByte(FileInfo *); |
|---|
| 50 | |
|---|
| 51 | extern WizardExport WizardBooleanType |
|---|
| 52 | DestroyFile(FileInfo *,ExceptionInfo *), |
|---|
| 53 | ReadFile16Bits(FileInfo *,unsigned short *), |
|---|
| 54 | ReadFile32Bits(FileInfo *,unsigned long *), |
|---|
| 55 | ReadFile64Bits(FileInfo *,WizardSizeType *), |
|---|
| 56 | ReadFileChunk(FileInfo *,void *,const size_t), |
|---|
| 57 | WriteFileChunk(FileInfo *,const void *,const size_t), |
|---|
| 58 | WriteFile16Bits(FileInfo *,const unsigned short), |
|---|
| 59 | WriteFile32Bits(FileInfo *,const unsigned long), |
|---|
| 60 | WriteFile64Bits(FileInfo *,const WizardSizeType); |
|---|
| 61 | |
|---|
| 62 | #if defined(__cplusplus) || defined(c_plusplus) |
|---|
| 63 | } |
|---|
| 64 | #endif |
|---|
| 65 | |
|---|
| 66 | #endif |
|---|