Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
A VirtualDirectory that operates on reguar disk directories. More...
#include <DiskDirectory.hpp>
Public Member Functions | |
DiskDirectory () | |
DiskDirectory (const String &path) | |
void | listFilesRecursive (std::vector< String > &file_list) const |
Use carefully this function, since this search the whole given file system tree. | |
void | listFiles (std::vector< String > &file_list, bool append=false) const |
void | listFiles (std::vector< ref< DiskFile > > &file_list, bool append=false) const |
void | listSubDirs (std::vector< String > &dirs, bool append=false) const |
ref< DiskDirectory > | diskSubDir (const String &subdir_name) const |
ref< VirtualDirectory > | subDir (const String &subdir_name) const |
virtual ref< VirtualFile > | file (const String &name) const |
Returns the VirtualFile with the given name if any, NULL otherwise. | |
virtual ref< DiskFile > | diskFile (const String &name) const |
bool | exists () const |
Protected Member Functions | |
void | listFilesRecursive_internal (std::vector< String > &file_list) const |
A VirtualDirectory that operates on reguar disk directories.
Definition at line 55 of file DiskDirectory.hpp.
DiskDirectory::DiskDirectory | ( | ) |
Definition at line 55 of file DiskDirectory.cpp.
Referenced by diskSubDir().
DiskDirectory::DiskDirectory | ( | const String & | path ) |
Definition at line 50 of file DiskDirectory.cpp.
References vl::VirtualDirectory::setPath().
void DiskDirectory::listFilesRecursive | ( | std::vector< String > & | file_list ) | const [virtual] |
Use carefully this function, since this search the whole given file system tree.
Implements vl::VirtualDirectory.
Definition at line 59 of file DiskDirectory.cpp.
References listFilesRecursive_internal().
void DiskDirectory::listFiles | ( | std::vector< String > & | file_list, |
bool | append = false |
||
) | const [virtual] |
Implements vl::VirtualDirectory.
Definition at line 217 of file DiskDirectory.cpp.
References vl::Log::error(), NULL, vl::VirtualDirectory::path(), vl::String::ptr(), and vl::String::toUTF8().
Referenced by listFiles().
void DiskDirectory::listFiles | ( | std::vector< ref< DiskFile > > & | file_list, |
bool | append = false |
||
) | const |
Definition at line 201 of file DiskDirectory.cpp.
References file(), and listFiles().
void DiskDirectory::listSubDirs | ( | std::vector< String > & | dirs, |
bool | append = false |
||
) | const [virtual] |
Implements vl::VirtualDirectory.
Definition at line 129 of file DiskDirectory.cpp.
References vl::Log::error(), NULL, vl::VirtualDirectory::path(), vl::String::ptr(), and vl::String::toUTF8().
Referenced by diskSubDir().
ref< DiskDirectory > DiskDirectory::diskSubDir | ( | const String & | subdir_name ) | const |
Definition at line 65 of file DiskDirectory.cpp.
References DiskDirectory(), vl::String::empty(), vl::Log::error(), vl::String::length(), vl::length(), listSubDirs(), NULL, vl::VirtualDirectory::path(), vl::String::right(), vl::String::startsWith(), and vl::VirtualDirectory::translatePath().
ref<VirtualDirectory> vl::DiskDirectory::subDir | ( | const String & | subdir_name ) | const [inline, virtual] |
Implements vl::VirtualDirectory.
Definition at line 75 of file DiskDirectory.hpp.
virtual ref<VirtualFile> vl::DiskDirectory::file | ( | const String & | name ) | const [virtual] |
Returns the VirtualFile with the given name if any, NULL otherwise.
Implements vl::VirtualDirectory.
Referenced by listFiles().
bool DiskDirectory::exists | ( | ) | const |
Definition at line 96 of file DiskDirectory.cpp.
References vl::Log::error(), NULL, vl::VirtualDirectory::path(), vl::String::ptr(), and vl::String::toUTF8().
void vl::DiskDirectory::listFilesRecursive_internal | ( | std::vector< String > & | file_list ) | const [protected] |
Referenced by listFilesRecursive().