63 std::vector<String> paths;
64 paths.push_back(full_path);
65 if (!alternate_path.
empty())
66 paths.push_back(alternate_path +
'/' + full_path);
70 if (!alternate_path.
empty())
74 for(
unsigned ipath=0; ipath<paths.size(); ++ipath)
76 paths[ipath].normalizeSlashes();
100 if ( disk_directory->
exists() )
101 return disk_directory;
118 std::vector<String> file_list_part;
122 directories()[idir]->listFilesRecursive(file_list_part);
123 file_list.reserve( file_list.size() + file_list_part.size() );
124 for(
unsigned j=0; j<file_list_part.size(); ++j)
125 file_list.push_back( file_list_part[j] );
132 std::vector<String> file_list_part;
136 directories()[idir]->listFilesRecursive(file_list_part, match);
137 file_list.reserve( file_list.size() + file_list_part.size() );
138 for(
unsigned j=0; j<file_list_part.size(); ++j)
139 file_list.push_back( file_list_part[j] );
std::vector< ref< VirtualDirectory > > & directories()
Returns the list of VirtualDirectory objects added to a FileSystem.
The String class implements an advanced UTF16 (Unicode BMP) string manipulation engine.
A VirtualDirectory that operates on reguar disk directories.
virtual ref< VirtualFile > locateFile(const String &full_path, const String &alternate_path=String()) const
Looks for a VirtualFile on the disk and in the currently active FileSystem.
Visualization Library main namespace.
virtual void listFilesRecursive(std::vector< String > &file_list) const
Returns the names of all the files contained in the previously added Directories. ...
virtual ref< VirtualDirectory > locateDirectory(const String &name) const
bool empty() const
Returns true if length() == 0.
String extractFileName() const
If the String contains a file path the function returns the file name without the path...
A VirtualFile that operates on regular disk files.
The ref<> class is used to reference-count an Object.
virtual bool exists() const
Returns true if the file exists.