Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

_CxArchiveOps Struct Reference

File operations structure. More...

#include <libcomprex/module.h>


Data Fields

CxStatus(* readArchive )(CxArchive *archive, CxFP *fp)
 Reads an archive and returns information on it.

CxStatus(* saveArchive )(CxArchive *archive, CxFP *fp)
 Saves an archive to a file.

void(* closeArchive )(CxArchive *archive)
 Closes an archive.

CxFP *(* openFile )(CxFile *file, CxAccessMode mode)
 Opens a contained file for reading, writing, or appending.

void(* destroyFile )(CxFile *file)
 Destroys the module-specific data in a contained file.

char(* supportsExtension )(const char *ext)
 Determines if the module supports the specified file extension.


Detailed Description

File operations structure.

This structure is to be filled out by all modules that handle comression/decompression of files.

See also:
CxModuleType

CxSchemeOps


Field Documentation

void(* _CxArchiveOps::closeArchive)(CxArchive *archive)
 

Closes an archive.

Parameters:
archive The archive structure.

void(* _CxArchiveOps::destroyFile)(CxFile *file)
 

Destroys the module-specific data in a contained file.

Parameters:
file The file to destroy.

CxFP*(* _CxArchiveOps::openFile)(CxFile *file, CxAccessMode mode)
 

Opens a contained file for reading, writing, or appending.

Parameters:
file The file structure.
mode The access mode.
Returns:
The file pointer to this file.

CxStatus(* _CxArchiveOps::readArchive)(CxArchive *archive, CxFP *fp)
 

Reads an archive and returns information on it.

This is similar to openDir(), but reports information on the archive file itself, as well as all of the files stored inside it.

Parameters:
archive The archive structure, which will contain the archive information.
fp The file pointer to the archive file.
Returns:
The status of the operation.

CxStatus(* _CxArchiveOps::saveArchive)(CxArchive *archive, CxFP *fp)
 

Saves an archive to a file.

Parameters:
archive The archive structure.
fp The file pointer to the archive file.
Returns:
The status of the operation.

char(* _CxArchiveOps::supportsExtension)(const char *ext)
 

Determines if the module supports the specified file extension.

This should just give a best guess. All string comparisons should be case-insensitive.

Parameters:
ext The extension (without the leading '.')
Returns:
1 if the extension is supported; 0 otherwise.


The documentation for this struct was generated from the following file:
Generated on Wed Mar 5 20:47:44 2003 for libcomprex by doxygen1.2.18-20021020