Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef DiskDirectory_INCLUDE_ONCE
00033 #define DiskDirectory_INCLUDE_ONCE
00034
00035 #include <vlCore/VirtualDirectory.hpp>
00036
00037 namespace vl
00038 {
00039 class DiskFile;
00040
00041
00042
00055 class VLCORE_EXPORT DiskDirectory: public VirtualDirectory
00056 {
00057 VL_INSTRUMENT_CLASS(vl::DiskDirectory, VirtualDirectory)
00058
00059 public:
00060 DiskDirectory();
00061
00062 DiskDirectory( const String& path );
00063
00065 void listFilesRecursive(std::vector<String>& file_list) const;
00066
00067 void listFiles(std::vector<String>& file_list, bool append=false) const;
00068
00069 void listFiles(std::vector< ref<DiskFile> >& file_list, bool append=false) const;
00070
00071 void listSubDirs(std::vector<String>& dirs, bool append=false) const;
00072
00073 ref<DiskDirectory> diskSubDir(const String& subdir_name) const;
00074
00075 ref<VirtualDirectory> subDir(const String& subdir_name) const { return diskSubDir(subdir_name); }
00076
00077 virtual ref<VirtualFile> file(const String& name) const;
00078
00079 virtual ref<DiskFile> diskFile(const String& name) const;
00080
00081 bool exists() const;
00082
00083 protected:
00084 void listFilesRecursive_internal(std::vector<String>& file_list) const;
00085 };
00086 }
00087
00088 #endif