Panda3D
|
A composite directory within the VirtualFileSystem: this maps to more than one directory on different mount points. More...
#include "virtualFileComposite.h"
Public Member Functions | |
VirtualFileComposite (VirtualFileSystem *file_system, const Filename &filename) | |
void | add_component (VirtualFile *file) |
Adds one more component to the composite directory. | |
virtual TypeHandle | force_init_type () |
virtual VirtualFileSystem * | get_file_system () const |
Returns the VirtualFileSystem this file is associated with. | |
virtual Filename | get_filename () const |
Returns the full pathname to this file within the virtual file system. | |
virtual TypeHandle | get_type () const |
virtual bool | has_file () const |
Returns true if this file exists, false otherwise. | |
virtual bool | is_directory () const |
Returns true if this file represents a directory (and scan_directory() may be called), false otherwise. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
Protected Member Functions | |
virtual bool | scan_local_directory (VirtualFileList *file_list, const ov_set< string > &mount_points) const |
Fills file_list up with the list of files that are within this directory, excluding those whose basenames are listed in mount_points. |
A composite directory within the VirtualFileSystem: this maps to more than one directory on different mount points.
The resulting directory appears to be the union of all the individual simple directories.
Definition at line 29 of file virtualFileComposite.h.
void VirtualFileComposite::add_component | ( | VirtualFile * | file | ) | [inline] |
Adds one more component to the composite directory.
The component should be a directory and the file system and filename should match the composite.
Definition at line 36 of file virtualFileComposite.I.
References VirtualFile::is_directory().
VirtualFileSystem * VirtualFileComposite::get_file_system | ( | ) | const [virtual] |
Returns the VirtualFileSystem this file is associated with.
Implements VirtualFile.
Definition at line 27 of file virtualFileComposite.cxx.
Filename VirtualFileComposite::get_filename | ( | ) | const [virtual] |
Returns the full pathname to this file within the virtual file system.
Implements VirtualFile.
Definition at line 38 of file virtualFileComposite.cxx.
bool VirtualFileComposite::has_file | ( | ) | const [virtual] |
Returns true if this file exists, false otherwise.
Reimplemented from VirtualFile.
Definition at line 48 of file virtualFileComposite.cxx.
static void VirtualFileComposite::init_type | ( | ) | [inline, static] |
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Making it inline seems to cause problems in the optimizer.
Reimplemented from VirtualFile.
Definition at line 64 of file virtualFileComposite.h.
References VirtualFile::init_type().
bool VirtualFileComposite::is_directory | ( | ) | const [virtual] |
Returns true if this file represents a directory (and scan_directory() may be called), false otherwise.
Reimplemented from VirtualFile.
Definition at line 59 of file virtualFileComposite.cxx.
bool VirtualFileComposite::scan_local_directory | ( | VirtualFileList * | file_list, |
const ov_set< string > & | mount_points | ||
) | const [protected, virtual] |
Fills file_list up with the list of files that are within this directory, excluding those whose basenames are listed in mount_points.
Returns true if successful, false if the file is not a directory or the directory cannot be read.
Reimplemented from VirtualFile.
Definition at line 73 of file virtualFileComposite.cxx.