|
IOService Struct Reference
[I/O Services.]
Inherits CoreFileServer.
Inherited by IOImpl.
List of all members.
Detailed Description
Data management service.
Member Function Documentation
| virtual void IOService::associate |
( |
const Char * |
type, |
|
|
const Char * |
rw |
|
) |
[pure virtual] |
|
|
|
Associate a file extension with a particular ReaderWriter service. |
| virtual InputStream* IOService::createInputStream |
( |
const Char * |
filename |
) |
[pure virtual] |
|
|
|
Open an input stream on a file. For many services, you may use fromFile() instead. |
| virtual OutputStream* IOService::createOutputStream |
( |
const Char * |
filename |
) |
[pure virtual] |
|
|
|
Open an output stream to a new file. |
| virtual Service* IOService::fromFile |
( |
const Char * |
filename |
) |
[pure virtual] |
|
|
|
Load an object from a disk file. Uses the file extension to locate a ReaderWriter. |
|
|
Load an object from an input stream. -
Parameters:
-
| s |
The input stream. |
| type |
A type string used to locate a reader for this service. This is usually the file extension associated with the data type, such as "png" for PNG image files. |
-
Returns:
-
The loaded service is successful,
NULL otherwise. |
| virtual Directory* IOService::getDirectory |
( |
const Char * |
path |
) |
[pure virtual] |
|
|
|
Access a directory of files. |
| virtual bool IOService::mountFilesystem |
( |
const Char * |
name, |
|
|
const Char * |
path |
|
) |
[pure virtual] |
|
|
|
Add a new file source. -
Parameters:
-
| name |
A unique name for the mount point. If a previous mount uses the same name it will be overwritten. |
| path |
The mount point. This may be a directory or (eventually) an archive like a .zip file. |
-
Returns:
-
True if successful, false if the mount point could not be found or accessed.
Once the filesystem has been mounted, you can access it by name: |
| virtual bool IOService::runStream |
( |
InputStream * |
s, |
|
|
Context * |
context = 0 |
|
) |
[pure virtual] |
|
|
|
Read and execute script code from an input stream. |
| virtual bool IOService::toFile |
( |
Service * |
srv, |
|
|
const Char * |
filename |
|
) |
[pure virtual] |
|
|
|
Write an object to a disk file. Uses the file extension to locate a ReaderWriter. |
|
|
Write an object to an output stream. -
Parameters:
-
| srv |
The object to write. |
| os |
The output stream |
| type |
A type string is used to locate a writer for this service. This is usually the file extension associated with the file format, such as "png" for PNG image files. |
|
| virtual void IOService::unmountFilesystem |
( |
const Char * |
name |
) |
[pure virtual] |
|
The documentation for this struct was generated from the following file:
Flat Four Engine
Copyright (C) 2001 by 379, Inc.
|
This page generated by Doxygen
|
|