|
Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
|
The DiskIo class makes it possible for the web server to work with resources on a hard drive.
A directory separator is always '/'. DOS based file systems that cannot handle forward slash must internally convert to and from '/'.
A DiskIo instance can directly work on the root of the file system, but it is more common to give the DiskIo instance an offset value. The offset value is set with method DiskIo::setRootDir
Root syntax and default roots are platform-specific. Desktop ports accept absolute paths and selected relative paths; embedded ports may require a mounted volume or a platform-specific prefix. See xrc/DiskIo for the port selected by the build. Call setRootDir explicitly before serving files.
This generic interface does not mount media, enforce filesystem permissions, or replace the platform's path and symbolic-link rules. Stop dependent readers and serialize operations before changing its root or destroying it.
#include <BaDiskIo.h>

Public Member Functions | |
| DiskIo () | |
| Create a DiskIo instance and set the root directory to '/'. More... | |
| ~DiskIo () | |
| Release the root configuration and notify an attached I/O interface. More... | |
| int | setRootDir (const char *root) |
| Select the filesystem location exposed as this I/O interface's root. More... | |
| int | getRootDir (char *buf, int len) |
| Copy the configured root representation. More... | |
Additional Inherited Members | |
Public Attributes inherited from IoIntf | |
| IoIntf_Property | propertyFp |
| Set or get property. More... | |
| IoIntf_CloseDir | closeDirFp |
| Close directory. More... | |
| IoIntf_MkDir | mkDirFp |
| Make directory. More... | |
| IoIntf_Rename | renameFp |
| Rename resource. More... | |
| IoIntf_OpenDir | openDirFp |
| Open directory. More... | |
| IoIntf_OpenRes | openResFp |
| Open resource. More... | |
| IoIntf_OpenResGzip | openResGzipFp |
| Open file as a compressed gzip file. More... | |
| IoIntf_Remove | removeFp |
| Remove file. More... | |
| IoIntf_RmDir | rmDirFp |
| Remove directory. More... | |
| IoIntf_Stat | statFp |
| Get resource information. More... | |