Barracuda Application Server C/C++ Reference
NO

Detailed Description

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

The setRootDir method can accept an absolute or relative path argument. As an example, all example programs compiled in 'debug' mode executes from the 'obj/debug' directory. All 'debug mode' examples opens a DiskIo and sets the root path to '../../html' and binds the DiskIo to a HttpResRdr instance. This makes it possible for the web-server to access the HTML files in the 'html' directory.

This is a generic header file for all file systems and platforms.

Barracuda does not officially support native file systems as Barracuda can easily work without using a file system. However, the xrc/DiskIo directory contains implementation for common file systems. This directory also contains the BaFile API used by some of the example code.

#include <BaDiskIo.h>

Inheritance diagram for DiskIo:

Public Member Functions

 DiskIo ()
 Create a DiskIo instance and set the root directory to '/'. More...
 
 ~DiskIo ()
 Terminate the DiskIo instance.
 
int setRootDir (const char *root)
 Set the root directory. More...
 

Additional Inherited Members

- Public Attributes inherited from IoIntf
IoIntf_Property propertyFp
 Set or get property.
 
IoIntf_CloseDir closeDirFp
 Close directory.
 
IoIntf_MkDir mkDirFp
 Make directory. More...
 
IoIntf_Rename renameFp
 Rename resource. More...
 
IoIntf_OpenDir openDirFp
 Open directory.
 
IoIntf_OpenRes openResFp
 Open resource.
 
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.