$treeview $search $mathjax
Stratagus
2.2.6
$projectbrief
|
$projectbrief
|
$searchbox |
_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include <vector>
#include <zlib.h>
#include <bzlib.h>
Go to the source code of this file.
Classes | |
class | FileException |
class | FileWriter |
class | FileList |
class | CFile |
iolib.h - The iolib functions header file. | |
#define | CL_OPEN_READ 0x1 |
#define | CL_OPEN_WRITE 0x2 |
#define | CL_WRITE_GZ 0x4 |
#define | CL_WRITE_BZ2 0x8 |
enum | { CLF_TYPE_INVALID, CLF_TYPE_PLAIN, CLF_TYPE_GZIP, CLF_TYPE_BZIP2 } |
FileWriter * | CreateFileWriter (const std::string &filename) |
char * | LibraryFileName (const char *file, char *buffer, size_t buffersize) |
Build libary path name. | |
int | ReadDataDirectory (const char *dirname, int(*filter)(char *, FileList *), std::vector< FileList > &flp) |
Read the contents of a directory. |
#define CL_OPEN_READ 0x1 |
#define CL_OPEN_WRITE 0x2 |
#define CL_WRITE_BZ2 0x8 |
#define CL_WRITE_GZ 0x4 |
anonymous enum |
FileWriter* CreateFileWriter | ( | const std::string & | filename | ) |
Create a file writer object that works for the given file name.
If the file name ends with '.gz', the file writer returned will compress the data with zlib.
Create FileWriter
char* LibraryFileName | ( | const char * | file, | |
char * | buffer, | |||
size_t | buffersize | |||
) |
Build libary path name.
Generate a filename into library.
Try current directory, user home directory, global directory. This supports .gz, .bz2 and .zip.
file | Filename to open. | |
buffer | Allocated buffer for generated filename. | |
buffersize | Size of the buffer |
int ReadDataDirectory | ( | const char * | dirname, | |
int(*)(char *, FileList *) | filter, | |||
std::vector< FileList > & | fl | |||
) |
Read the contents of a directory.
Generate a list of files within a specified directory
dirname | Directory to read. | |
filter | Optional xdata-filter function. | |
fl | Filelist pointer. |