48#include "HttpServer.h"
56#define DiskIo_DATA void* data
99 void operator delete(
void* d) {
if(d)
::baFree(d); }
100 void *
operator new(size_t,
void *place) {
return place; }
101 void operator delete(
void*,
void *) { }
127 int getRootDir(
char* buf,
int len);
144BA_API
void DiskIo_constructor(
DiskIo* o);
145BA_API
void DiskIo_destructor(
DiskIo* o);
146BA_API
int DiskIo_setRootDir(
DiskIo* o,
const char* root);
147BA_API
int DiskIo_getRootDir(
DiskIo* o,
char* buf,
int len);
152 DiskIo_constructor(
this);
155 DiskIo_destructor(
this);
158 return DiskIo_setRootDir(
this, root);
160inline int DiskIo::getRootDir(
char* buf,
int len) {
161 return DiskIo_getRootDir(
this, buf, len);
void * baMalloc(size_t size)
Returns pointer to uninitialized newly-allocated space for an object of size "size",...
void baFree(void *p)
Deallocates space to which it points.
int setRootDir(const char *root)
Set the root directory.
Definition: BaDiskIo.h:157
~DiskIo()
Terminate the DiskIo instance.
Definition: BaDiskIo.h:154
DiskIo DiskIo
The DiskIo class makes it possible for the web-server to work with resources on a hard drive.
DiskIo()
Create a DiskIo instance and set the root directory to '/'.
Definition: BaDiskIo.h:151
The DiskIo class makes it possible for the web-server to work with resources on a hard drive.
Definition: BaDiskIo.h:97
The IoIntf class specifies an abstract file API, implementations include ZipIo, DiskIo,...
Definition: IoIntf.h:377