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

GaiaFS Class Reference

GaiaFS - Gaia File System. More...

List of all members.

Public Types

typedef Gaia::DOS::Container Container
typedef Gaia::DOS::ContainerManager FileServer
typedef Gaia::DOS::LayoutManager::CtxtSeq Context
typedef Gaia::DOS::LayoutManager::MountEntry MountEntry
typedef Gaia::DOS::NotReachable NotReachable
typedef Gaia::DOS::NotFound NotFound
typedef Gaia::DOS::NotAvailable NotAvailable
typedef Gaia::DOS::NotSupported NotSupported
typedef Gaia::DOS::SecurityCheck SecurityCheck
typedef Gaia::DOS::MemoryLimit MemoryLimit
typedef Gaia::DOS::IllegalArgument IllegalArgument
typedef Gaia::DOS::IOError IOError
typedef Gaia::DOS::OutOfBounds OutOfBounds
typedef Gaia::DOS::InUse InUse

Static Public Methods

GaiaFS::Container * open (const char *name, const char *kind, int mode, int index=0)
 Create a new generic container so that it can passed to another object and adapted to a type.

GaiaFS::Container * duplicate (GaiaFS::Container *container)
 Duplicate a container reference.

int access (const char *name, int mode)
 Check the accessability of a file.

GaiaES::Channel * addListener (GaiaFS::Listener *listener)
 Add a listener of file system changes.

void removeListener (GaiaFS::Listener *listener)
 Remove a listener of file system changes.

void removeListener (GaiaES::Channel *channel)
 Remove a listener of file system changes.

void mode (int mode)
 Set the current mode (file or context mode).

int mode ()
 Get the current mode setting.

void refresh ()
 Refresh the mount table cache.

int mode (const char *path)
 Try to infer the mode from the path structure.

void context (Context &context)
 Set the current context.

const char * pwd ()
 Gets the present working directory for the current mode.

char * path (const char *path)
 Return a clean version of the path.

void owner (const char *owner)
 Set the current owner.

const char * owner ()
 Get the current owner.

const char * home ()
 Get the home directory.

void chdir (const char *dir)
 Change current directory.

const char * host (GaiaFS::FileServer *server)
 Get the host that this manager runs on.

Lookup * lookup (const char *name)
 Lookup a path and get information to access it.

const char * user (const char *dir)
 Get the user portion of the directory.

const char * user (unsigned short &last)
 Get the next active user name.

const char * mount (unsigned short &last)
 Get the next directory under this mount point.

bool ismount (const char *path)
 Tell if path is a mount point.

void mount (MountEntry &entry)
 Add a new mount to the space.

void unmount ()
 Remove all mounts of the current user.

void print ()
 Print what is in the mount table.

const char * localize (const char *name, int index)
 Create a local version of the file.


Static Public Attributes

unsigned long Exist
 Exist file mode.

unsigned long New
 New file mode.

unsigned long Write
 Write file mode.

unsigned long Read
 Read file mode.

unsigned long Append
 Append file mode.

unsigned long FileMode
 File system is in file mode.

unsigned long CtxtMode
 File system is in context mode.

unsigned long Dir
 File is a directory.

unsigned long File
 File is a file.

unsigned long DirLink
 File is a directory link.

unsigned long FileLink
 File is a file link.

unsigned long VirtDir
 File is a virtual directory.

unsigned long CtxtDir
 File is a context directory.


Detailed Description

GaiaFS - Gaia File System.

This class allows access to the Gaia file system. Files and directories can be accessed as particular types and the infrastructure will perform format conversions.


Member Function Documentation

int GaiaFS::access const char *    name,
int    mode
[static]
 

Check the accessability of a file.

Parameters:
name  the name of the file to check
mode  the accessibility mode; see access modes
Returns:
< 0 if mode is not valid

GaiaES::Channel* GaiaFS::addListener GaiaFS::Listener   listener [static]
 

Add a listener of file system changes.

Parameters:
listener  the interface that will get called back when a change event occurs
Returns:
channel the event channel registered to

void GaiaFS::chdir const char *    dir [static]
 

Change current directory.

Parameters:
the  directory to change to
Exceptions:
GaiaFS::IllegalArgument 

void GaiaFS::context Context &    context [static]
 

Set the current context.

Parameters:
context  the context to set the space to

GaiaFS::Container* GaiaFS::duplicate GaiaFS::Container *    container [static]
 

Duplicate a container reference.

Parameters:
container  the container reference to dupicate
Returns:
the duplicated reference

const char* GaiaFS::home   [static]
 

Get the home directory.

Returns:
the home directory

const char* GaiaFS::host GaiaFS::FileServer *    server [static]
 

Get the host that this manager runs on.

Parameters:
server  a handle to the file server
Returns:
the host that this file server is running.

bool GaiaFS::ismount const char *    path [static]
 

Tell if path is a mount point.

Parameters:
path  the path to check
Returns:
true of path is a mount point

const char* GaiaFS::localize const char *    name,
int    index
[static]
 

Create a local version of the file.

Use this if the file needs to be read by a native application. Modifying the file will only change the copy, not the original file.

Parameters:
name  the name of the file to open
index  the index if files are aggregated
Returns:
the local file name
Exceptions:
GaiaFS::NotReachable 
GaiaFS::NotFound 
GaiaFS::NotAvailable 
GaiaFS::NotSupported 
GaiaFS::SecurityCheck 
GaiaFS::MemoryLimit 
GaiaFS::IllegalArgument 
GaiaFS::IOError 

Lookup* GaiaFS::lookup const char *    name [static]
 

Lookup a path and get information to access it.

Mode will override the default mode if desired.

Parameters:
name  the name of the file to resolve
Returns:
the resolve information

int GaiaFS::mode const char *    path [static]
 

Try to infer the mode from the path structure.

Parameters:
path  the path to check the mode for

int GaiaFS::mode   [static]
 

Get the current mode setting.

Returns:
the current mode

void GaiaFS::mode int    mode [static]
 

Set the current mode (file or context mode).

Parameters:
mode  mode of file system
Exceptions:
GaiaFS::IOError 

void GaiaFS::mount MountEntry &    entry [static]
 

Add a new mount to the space.

Parameters:
mount  the mount to add
Exceptions:
GaiaFS::IOError 

const char* GaiaFS::mount unsigned short &    last [static]
 

Get the next directory under this mount point.

Parameters:
last  point to last entry
Returns:
the mount

GaiaFS::Container* GaiaFS::open const char *    name,
const char *    kind,
int    mode,
int    index = 0
[static]
 

Create a new generic container so that it can passed to another object and adapted to a type.

Parameters:
name  the name of the file to open
kind  the type to open the file as
mode  the mode to open the file as
index  the index if files are aggregated
Returns:
the opened container
Exceptions:
GaiaFS::NotReachable 
GaiaFS::NotFound 
GaiaFS::NotAvailable 
GaiaFS::NotSupported 
GaiaFS::SecurityCheck 
GaiaFS::MemoryLimit 
GaiaFS::IllegalArgument 
GaiaFS::IOError 

const char* GaiaFS::owner   [static]
 

Get the current owner.

Returns:
the current owner

void GaiaFS::owner const char *    owner [static]
 

Set the current owner.

Parameters:
owner  the current owner

char* GaiaFS::path const char *    path [static]
 

Return a clean version of the path.

Parameters:
path  the path to clean
Returns:
the cleaned path

void GaiaFS::print   [static]
 

Print what is in the mount table.

const char* GaiaFS::pwd   [static]
 

Gets the present working directory for the current mode.

Returns:
the current working directory

void GaiaFS::refresh   [static]
 

Refresh the mount table cache.

Exceptions:
GaiaFS::IOError 

void GaiaFS::removeListener GaiaES::Channel *    channel [static]
 

Remove a listener of file system changes.

Parameters:
channel  the channel that was registered to

void GaiaFS::removeListener GaiaFS::Listener   listener [static]
 

Remove a listener of file system changes.

Parameters:
listener  the listener object for events

void GaiaFS::unmount   [static]
 

Remove all mounts of the current user.

Exceptions:
GaiaFS::IOError 

const char* GaiaFS::user unsigned short &    last [static]
 

Get the next active user name.

Parameters:
last  pointer to last entry
Returns:
the user name

const char* GaiaFS::user const char *    dir [static]
 

Get the user portion of the directory.

Parameters:
dir  the directory
Returns:
the user part


Member Data Documentation

unsigned long GaiaFS::Append [static]
 

Append file mode.

Puts file position point to end of file.

unsigned long GaiaFS::CtxtDir [static]
 

File is a context directory.

unsigned long GaiaFS::CtxtMode [static]
 

File system is in context mode.

unsigned long GaiaFS::Dir [static]
 

File is a directory.

unsigned long GaiaFS::DirLink [static]
 

File is a directory link.

unsigned long GaiaFS::Exist [static]
 

Exist file mode.

Checks if a file exits.

unsigned long GaiaFS::File [static]
 

File is a file.

unsigned long GaiaFS::FileLink [static]
 

File is a file link.

unsigned long GaiaFS::FileMode [static]
 

File system is in file mode.

unsigned long GaiaFS::New [static]
 

New file mode.

unsigned long GaiaFS::Read [static]
 

Read file mode.

Fails if non-existing.

unsigned long GaiaFS::VirtDir [static]
 

File is a virtual directory.

unsigned long GaiaFS::Write [static]
 

Write file mode.

Truncates on open.


The documentation for this class was generated from the following file:
Generated on Wed Sep 18 18:10:51 2002 for Gaia by doxygen1.2.16