Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

LocalFilePlugin Class Reference

#include <LocalFilePlugin.h>

Inheritance diagram for LocalFilePlugin:

FilePlugin Plugin List of all members.

Public Methods

bool init ()
CoreError create (NumID &fileid)
CoreError open (NumID fileid, NumID &of)
CoreError remove (NumID fileid)
int64_t getLength (NumID fileid)
CoreError write (NumID fileid, char *data, int length)
CoreError read (NumID fileid, char *data, int length, int &bRead)
CoreError close (NumID fileid)

Detailed Description

This file plugin will store files on the local filesystem. The files will be created using temporary names (.new) to avoid opening these files before they are finished.

This class is thread-safe.


Member Function Documentation

CoreError LocalFilePlugin::close NumID    fileid [virtual]
 

Close newly created or open file.

Parameters:
fileid  the open file to close
Returns:
status code

Implements FilePlugin.

CoreError LocalFilePlugin::create NumID &    fileid [virtual]
 

Create and store a new file on the fileserver.

Parameters:
fileid  the fileid that was created
Returns:
status code

Implements FilePlugin.

int64_t LocalFilePlugin::getLength NumID    fileid [virtual]
 

Get the length of an open file.

Parameters:
fileid  the file
Returns:
the length of the file or -1 on error

Implements FilePlugin.

bool LocalFilePlugin::init   [virtual]
 

Initialize the plugin

Implements Plugin.

CoreError LocalFilePlugin::open NumID    fileid,
NumID &    of
[virtual]
 

Open and read a file from the fileserver.

Parameters:
fileid  the file that is to be read
of  the reference that receives the open file ID
Returns:
status code

Implements FilePlugin.

CoreError LocalFilePlugin::read NumID    fileid,
char *    data,
int    length,
int &    bRead
[virtual]
 

Read binary data from file.

Parameters:
fileid  the open file to read from
data  the buffer that receives the data
length  the maximum number of bytes to read
bRead  receives the number of bytes actually read
Returns:
status code

Implements FilePlugin.

CoreError LocalFilePlugin::remove NumID    fileid [virtual]
 

Remove a file from the fileserver.

Parameters:
fileid  the file to remove
Returns:
status code

Implements FilePlugin.

CoreError LocalFilePlugin::write NumID    fileid,
char *    data,
int    length
[virtual]
 

Write binary data to new file.

Parameters:
fileid  the newly created file to write to
data  the data to write
length  the length of the data in bytes
Returns:
status code

Implements FilePlugin.


The documentation for this class was generated from the following files:
Generated on Wed Feb 18 13:45:56 2004 for strongroom by doxygen1.2.18