78 |
|
|
79 |
/** Whether file stream is open in read or in read/write mode. */ |
/** Whether file stream is open in read or in read/write mode. */ |
80 |
typedef enum { |
typedef enum { |
81 |
stream_mode_read, |
stream_mode_read = 0, |
82 |
stream_mode_read_write |
stream_mode_read_write = 1, |
83 |
|
stream_mode_closed = 2 |
84 |
} stream_mode_t; |
} stream_mode_t; |
85 |
|
|
86 |
/** Current state of the file stream. */ |
/** Current state of the file stream. */ |
230 |
/** Parses arbitrary RIFF files and provides together with it's base classes convenient methods to walk through the RIFF tree. */ |
/** Parses arbitrary RIFF files and provides together with it's base classes convenient methods to walk through the RIFF tree. */ |
231 |
class File : public List { |
class File : public List { |
232 |
public: |
public: |
233 |
File(); |
File(uint32_t FileType); |
234 |
File(const String& path); |
File(const String& path); |
235 |
stream_mode_t GetMode(); |
stream_mode_t GetMode(); |
236 |
bool SetMode(stream_mode_t NewMode); |
bool SetMode(stream_mode_t NewMode); |
258 |
|
|
259 |
unsigned long GetFileSize(); |
unsigned long GetFileSize(); |
260 |
void ResizeFile(unsigned long ulNewSize); |
void ResizeFile(unsigned long ulNewSize); |
261 |
|
#if POSIX |
262 |
|
unsigned long __GetFileSize(int hFile); |
263 |
|
#else |
264 |
|
unsigned long __GetFileSize(FILE* hFile); |
265 |
|
#endif |
266 |
}; |
}; |
267 |
|
|
268 |
/** Will be thrown whenever an error occurs while parsing a RIFF file. */ |
/** Will be thrown whenever an error occurs while parsing a RIFF file. */ |