Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RtFSyst
[File System]


Modules

Data Types
Windows

Functions

RwBool RtFileSystemSetCallBack (RtFileSystem *fs, RtFileSystemCallBackCode cbCode, RtFileSystemCallBack CallBack)
RtFileSystemCallBack RtFileSystemGetCallBack (RtFileSystem *fs, RtFileSystemCallBackCode cbCode)
RtFileSystemError RtFileSystemSetDeviceName (RtFileSystem *fs, RwChar *deviceName)
RwCharRtFileSystemGetDeviceName (RtFileSystem *fs)
RtFileSystemStatus RtFileSystemGetStatus (RtFileSystem *fs)
void RtFileSystemDefaultToAsync (RtFileSystem *fs, RwBool isAsync)
RwBool RtFileSystemIsDefaultedToAsync (RtFileSystem *fs)
void RtFileSystemSetOustandingOpCallback (RtFile *file, RtFSFileOpCallBack CallBack, void *CallBackData)

Detailed Description

File System

RtFSyst Overview

Requirements
The RenderWare file system toolkit allows the definition of custom file systems. Each file system must be registered with the file system manager, RtFSMgr, as it is the responsibility of the file system manager to perform all generic file operations. A custom file system contains all the functions necessary to undertake synchronous and asynchronous file operations.

The file system defaults all streaming to synchronous. This default mode allows you to use all the RwStream API functions normally. The default file system mode can be changed to asynchronous using the RtFileSystemDefaultToAsync function.

Also note that the file system toolkit allows you to initialize several custom file systems of the same type. This means that you can register many file systems on the same platform, providing that each of them has a different device name and a different file system name. This means that on certain platforms you can register a file system per existing device.

Significant changes have been made to the file system toolkit for RenderWare Graphics 3.7. For details, see the What's New in 3.7? section.


Function Documentation

void RtFileSystemDefaultToAsync RtFileSystem   fs,
RwBool    isAsync
 

RtFileSystemDefaultToAsync defaults the file system to asynchronous or synchronous mode.

The file system determines whether a file should be opened in synchronous or asynchronous mode, depending on the isAsync value passed to this function. Initially, all operations are performed synchonously. When a call to RtFileSystemDefaultToAsync is made, the default mode will be set for all operations following the call. This means that all operations performed on files opened before this call will still be undertaken according to the previous settings, i.e. the settings valid when the particular file was opened.

Parameters:
fs  The file system to default.
isAsync  If TRUE subsequent operations on this file system will default to asynchronous mode, if FALSE operations are synchronous.

RtFileSystemCallBack RtFileSystemGetCallBack RtFileSystem   fs,
RtFileSystemCallBackCode    cbCode
 

RtFileSystemGetCallBack gets a specific file system callback.

Please refer to the RtFileSystemCallBackCode documentation for more information on when specific callbacks are triggered.

Parameters:
fs  The file system to get the callback from.
cbCode  Callback code.
Returns:
The specific callback, or NULL if no callback is associated.

RwChar* RtFileSystemGetDeviceName RtFileSystem   fs
 

RtFileSystemGetDeviceName gets the current device name for a specific file system.

Parameters:
fs  The file system to get the device name from.
Returns:
The file system device name.

RtFileSystemStatus RtFileSystemGetStatus RtFileSystem   fs
 

RtFileSystemGetStatus gets the status of the specified file system. This function is useful if at any point you want to check the current state of the file system. This can give you information on whether the file system is ready and working properly or is having problem completing a specific task.

Parameters:
fs  The file system to get the status from.
Returns:
The file system status.
See also:
RtFileSystemStatus

RwBool RtFileSystemIsDefaultedToAsync RtFileSystem   fs
 

RtFileSystemIsDefaultedToAsync determines the mode to which this file system is currently defaulted.

Parameters:
fs  The file system.
Returns:
TRUE if fs is defaulted to asynchronous, FALSE otherwise.

RwBool RtFileSystemSetCallBack RtFileSystem   fs,
RtFileSystemCallBackCode    cbCode,
RtFileSystemCallBack    CallBack
 

RtFileSystemSetCallBack sets a specific file system callback, for a specific file system. This is determined by the callback code specified when calling this function.

Parameters:
fs  The file system to set the callcack to.
cbCode  Callcack code.
CallBack  The callback function.
Returns:
TRUE is successful, FALSE otherwise.
See also:
RtFileSystemCallBackCode

RtFileSystemError RtFileSystemSetDeviceName RtFileSystem   fs,
RwChar   deviceName
 

RtFileSystemSetDeviceName sets the device name for a specific file system. Note that the file system device name is case sensitive.

The device name is used by the file system toolkit to open files on a specific device. This device name can be user-defined or in some cases needs to be a valid existing name (for more information see the platform specific documentation).

Parameters:
fs  The file system to set the device name to.
deviceName  The device name.
Returns:
An error code or RTFS_ERROR_NOERROR if no error occured.

void RtFileSystemSetOustandingOpCallback RtFile   file,
RtFSFileOpCallBack    CallBack,
void *    CallBackData
 

RtFileSystemSetOustandingOpCallback set the callback for the current outstanding asynchronous operation. Note that the operation that follows a call to RtFileSystemSetOustandingOpCallback will set the appropriate file operation for the callback.

Parameters:
file  The file to set the callback on.
CallBack  Asynchronous callback function. This callback will only be triggered for on completion of the current outstanding operation.
CallBackData  Data passed to the callback function.


Criterion Software © 1993-2004 Criterion Software Limited. All rights reserved. Built Thu Feb 12 13:47:10 2004. Send Feedback