iVFS Struct Reference
[Virtual File System (VFS)]
The Virtual Filesystem Class is intended to be the only way for Crystal Space engine to access the files.
More...
#include <vfs.h>
Inheritance diagram for iVFS:

Public Methods | |
virtual bool | ChDir (const char *Path)=0 |
Set current working directory. | |
virtual const char * | GetCwd () const=0 |
Get current working directory. | |
virtual void | PushDir ()=0 |
Push current directory. | |
virtual bool | PopDir ()=0 |
Pop current directory. | |
virtual csPtr< iDataBuffer > | ExpandPath (const char *Path, bool IsDir=false) const=0 |
Expand given virtual path, interpret all "." and ".."'s relative to 'currend virtual directory'. | |
virtual bool | Exists (const char *Path) const=0 |
Check whenever a file exists. | |
virtual csPtr< iStringArray > | FindFiles (const char *Path) const=0 |
Find all files in a virtual directory and return an array with their names. | |
virtual csPtr< iFile > | Open (const char *FileName, int Mode)=0 |
Replacement for standard fopen(). | |
virtual csPtr< iDataBuffer > | ReadFile (const char *FileName, bool nullterm=true)=0 |
Get an entire file at once. | |
virtual bool | WriteFile (const char *Name, const char *Data, size_t Size)=0 |
Write an entire file in one pass. | |
virtual bool | DeleteFile (const char *FileName)=0 |
Delete a file on VFS. | |
virtual bool | Sync ()=0 |
Close all opened archives, free temporary storage etc. | |
virtual bool | Mount (const char *VirtualPath, const char *RealPath)=0 |
Mount an VFS path on a "real-world-filesystem" path. | |
virtual bool | Unmount (const char *VirtualPath, const char *RealPath)=0 |
Unmount an VFS path; if RealPath is 0, entire VirtualPath is unmounted. | |
virtual csRef< iStringArray > | MountRoot (const char *VirtualPath)=0 |
Mount the root directory or directories beneath the given virtual path. | |
virtual bool | SaveMounts (const char *FileName)=0 |
Save current configuration back into configuration file. | |
virtual bool | GetFileTime (const char *FileName, csFileTime &oTime) const=0 |
Query file date/time. | |
virtual bool | SetFileTime (const char *FileName, const csFileTime &iTime)=0 |
Set file date/time. | |
virtual bool | GetFileSize (const char *FileName, size_t &oSize)=0 |
Query file size (without opening it). | |
virtual csPtr< iDataBuffer > | GetRealPath (const char *FileName)=0 |
Query real-world path from given VFS path. |
Detailed Description
The Virtual Filesystem Class is intended to be the only way for Crystal Space engine to access the files.This gives unified control over the way how files are found, read and written. VFS gives the following goodies over the standard file i/o functions:
- Multiple search directories. Several "real" directories can be collected together into one "virtual" directory.
- Directories can be mapped to "real" directories as well as to archives (.zip files). Files are compressed/decompressed transparently for clients.
- The Virtual File System is unique across all operating systems Crystal Space supports, no matter of features of the underlying OS.
Definition at line 173 of file vfs.h.
Member Function Documentation
|
Set current working directory.
|
|
Delete a file on VFS.
|
|
Check whenever a file exists.
|
|
Expand given virtual path, interpret all "." and ".."'s relative to 'currend virtual directory'. Return a new iString object. If IsDir is true, expanded path ends in an '/', otherwise no. |
|
Find all files in a virtual directory and return an array with their names.
|
|
Get current working directory.
|
|
Query file size (without opening it).
|
|
Query file date/time.
|
|
Query real-world path from given VFS path. This will work only for files that are stored on real filesystem, not in archive files. You should expect this function to return 0 in this case. |
|
Mount an VFS path on a "real-world-filesystem" path.
|
|
Mount the root directory or directories beneath the given virtual path. Returns a list of absolute virtual pathnames mounted by this operation. |
|
Replacement for standard fopen(). Mode: combination of VFS_FILE_XXX.
|
|
Pop current directory.
|
|
Push current directory.
|
|
Get an entire file at once. This is more effective than opening files and reading the file in blocks. Note that the returned buffer can be null-terminated (so that it can be conveniently used with string functions) but the extra null-terminator is not counted as part of the returned size.
|
|
Save current configuration back into configuration file.
|
|
Set file date/time.
|
|
Close all opened archives, free temporary storage etc.
|
|
Unmount an VFS path; if RealPath is 0, entire VirtualPath is unmounted.
|
|
Write an entire file in one pass.
|
The documentation for this struct was generated from the following file:
- iutil/vfs.h
Generated for Crystal Space by doxygen 1.2.18